This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elb_target_group: https://github.com/ansible/ansible/pull/45169 | |
ecs_taskdefinition: https://github.com/ansible/ansible/pull/44942 | |
lambda_policy: https://github.com/ansible/ansible/pull/44871 | |
ec2_metadata_facts: https://github.com/ansible/ansible/pull/43394 | |
elb_target_group: https://github.com/ansible/ansible/pull/43247 | |
aws_application_scaling_policy: https://github.com/ansible/ansible/pull/43042 | |
ec2_group: https://github.com/ansible/ansible/pull/42765 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(python2.7.13) MacBook-Pro-44:ansible shertel$ ansible-playbook test_ec2_group_diff_mode.yml -vvvvv | |
ansible-playbook 2.7.0.dev0 (pr/37212 d67a5c00ab) last updated 2018/08/17 15:54:55 (GMT -400) | |
config file = None | |
configured module search path = [u'/Users/shertel/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] | |
ansible python module location = /Users/shertel/Workspace/ansible_4/ansible/lib/ansible | |
executable location = /Users/shertel/Workspace/ansible_4/ansible/bin/ansible-playbook | |
python version = 2.7.13 (default, Sep 22 2017, 10:31:19) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] | |
No config file found; using defaults | |
setting up inventory plugins | |
Parsed /etc/ansible/hosts inventory source with ini plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py | |
index 479bdf1e4e..e31265d941 100755 | |
--- a/contrib/inventory/ec2.py | |
+++ b/contrib/inventory/ec2.py | |
@@ -247,6 +247,9 @@ class Ec2Inventory(object): | |
def __init__(self): | |
''' Main execution path ''' | |
+ # To allow using STS credentials for the connections to different services/regions, indicate when a role has already been assumed | |
+ self.assumed_role = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# structure: | |
playbook.yml # Yaml file to run | |
roles # A directory | |
manage_s3 # A directory for the role named manage_s3 | |
tasks # A directory | |
main.yml # The place where the role starts | |
# can have other playbooks to include in main.yml here | |
# Can also have a directory for vars, files, templates, etc: see https://docs.ansible.com/ansible/2.5/user_guide/playbooks_reuse_roles.html | |
# Can also have other roles here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: amazon_host | |
gather_facts: yes | |
tasks: | |
- name: create target files | |
file: | |
state: touch | |
path: "{{ item }}" | |
loop: ['/tmp/onlyonremote.txt', '/tmp/existseverywhere.txt'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++ b/lib/ansible/modules/cloud/amazon/ec2_tag.py | |
@@ -33,6 +33,10 @@ options: | |
default: present | |
choices: ['present', 'absent', 'list'] | |
aliases: [] | |
+ remove_by_tag_key_only: | |
+ description: | |
+ - a boolean to indicate whether to remove tags with matching keys | |
+ default: False | |
tags: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks: | |
- name: add two tags to a resource | |
ec2_tag: | |
state: present | |
resource: “{{ id }}” | |
tags: | |
foo: bar | |
name: test | |
#- name: this should remove the foo bar tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: no | |
tasks: | |
- name: create routing rules | |
ec2_vpc_route_table: | |
profile: shertel | |
vpc_id: "{{ vpc_id }}" | |
region: us-east-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
tasks: | |
- name: create a vpc | |
ec2_vpc_net: | |
name: ansible-test-vpc | |
cidr_block: 10.10.0.0/16 | |
profile: "{{ profile }}" | |
region: us-east-1 |
NewerOlder