diff --git a/lib/ansible/modules/cloud/amazon/ec2_eip.py b/lib/ansible/modules/cloud/amazon/ec2_eip.py index bd0c33d6df..3bf3c0e43f 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eip.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eip.py @@ -107,7 +107,7 @@ EXAMPLES = ''' register: ec2 - name: associate new elastic IPs with each of the instances ec2_eip: "device_id={{ item }}" - with_items: ec2.instance_ids + with_items: "{{ ec2.instance_ids }}" - name: allocate a new elastic IP inside a VPC in us-west-2 ec2_eip: region=us-west-2 in_vpc=yes register: eip diff --git a/lib/ansible/modules/cloud/amazon/ec2_elb.py b/lib/ansible/modules/cloud/amazon/ec2_elb.py index c6494982da..193c11827c 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_elb.py +++ b/lib/ansible/modules/cloud/amazon/ec2_elb.py @@ -95,7 +95,7 @@ post_tasks: instance_id: "{{ ansible_ec2_instance_id }}" ec2_elbs: "{{ item }}" state: present - with_items: ec2_elbs + with_items: "{{ ec2_elbs }}" """ import time diff --git a/lib/ansible/modules/cloud/amazon/ec2_tag.py b/lib/ansible/modules/cloud/amazon/ec2_tag.py index 9656e74c91..2436367fb8 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_tag.py +++ b/lib/ansible/modules/cloud/amazon/ec2_tag.py @@ -93,7 +93,7 @@ tasks: instance: "{{ item.id }}" region: eu-west-1 state: list - with_items: ec2.tagged_instances + with_items: "{{ ec2.tagged_instances }}" register: ec2_vol - name: tag the volumes diff --git a/lib/ansible/modules/cloud/amazon/ec2_vol.py b/lib/ansible/modules/cloud/amazon/ec2_vol.py index 31dae26dd1..1b7870111f 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vol.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vol.py @@ -133,7 +133,7 @@ EXAMPLES = ''' - ec2_vol: instance: "{{ item.id }} " volume_size: 5 - with_items: ec2.instances + with_items: "{{ ec2.instances }}" register: ec2_vol # Example: Launch an instance and then add a volume if not already attached @@ -154,7 +154,7 @@ EXAMPLES = ''' instance: "{{ item.id }}" name: my_existing_volume_Name_tag device_name: /dev/xvdf - with_items: ec2.instances + with_items: "{{ ec2.instances }}" register: ec2_vol # Remove a volume diff --git a/lib/ansible/modules/cloud/amazon/iam.py b/lib/ansible/modules/cloud/amazon/iam.py index bcfe9dfee6..a70549b087 100644 --- a/lib/ansible/modules/cloud/amazon/iam.py +++ b/lib/ansible/modules/cloud/amazon/iam.py @@ -142,7 +142,7 @@ task: name: jdavila state: update groups: "{{ item.created_group.group_name }}" - with_items: new_groups.results + with_items: "{{ new_groups.results }}" # Example of role with custom trust policy for Lambda service - name: Create IAM role with custom trust relationship diff --git a/lib/ansible/modules/cloud/amazon/iam_policy.py b/lib/ansible/modules/cloud/amazon/iam_policy.py index 7bb80bd31e..6c98b6f2f4 100644 --- a/lib/ansible/modules/cloud/amazon/iam_policy.py +++ b/lib/ansible/modules/cloud/amazon/iam_policy.py @@ -92,7 +92,7 @@ task: policy_name: "READ-ONLY" policy_document: readonlypolicy.json state: present - with_items: new_groups.results + with_items: "{{ new_groups.results }}" # Create a new S3 policy with prefix per user tasks: diff --git a/lib/ansible/modules/network/cumulus/cl_bond.py b/lib/ansible/modules/network/cumulus/cl_bond.py index 52da0bed3a..cc8930ce8b 100644 --- a/lib/ansible/modules/network/cumulus/cl_bond.py +++ b/lib/ansible/modules/network/cumulus/cl_bond.py @@ -171,7 +171,7 @@ cl_bond: mstpctl_portnetwork: "{{ item.value.mstpctl_portnetwork|default('no') }}" mstpctl_portadminedge: "{{ item.value.mstpctl_portadminedge|default('no') }}" mstpctl_bpduguard: "{{ item.value.mstpctl_bpduguard|default('no') }}" -with_dict: cl_bonds +with_dict: "{{ cl_bonds }}" notify: reload networking # In vars file diff --git a/lib/ansible/modules/network/cumulus/cl_bridge.py b/lib/ansible/modules/network/cumulus/cl_bridge.py index 256fa427d0..752d4fdd6e 100644 --- a/lib/ansible/modules/network/cumulus/cl_bridge.py +++ b/lib/ansible/modules/network/cumulus/cl_bridge.py @@ -124,7 +124,7 @@ cl_bridge: virtual_ip: "{{ item.value.virtual_ip|default(omit) }}" virtual_mac: "{{ item.value.virtual_mac|default(omit) }}" mstpctl_treeprio: "{{ item.value.mstpctl_treeprio|default(omit) }}" -with_dict: cl_bridges +with_dict: "{{ cl_bridges }}" notify: reload networking # In vars file diff --git a/lib/ansible/modules/network/cumulus/cl_interface.py b/lib/ansible/modules/network/cumulus/cl_interface.py index 3fd87bf919..241a69c7ef 100644 --- a/lib/ansible/modules/network/cumulus/cl_interface.py +++ b/lib/ansible/modules/network/cumulus/cl_interface.py @@ -151,7 +151,7 @@ cl_interface: mstpctl_portnetwork: "{{ item.value.mstpctl_portnetwork|default('no') }}" mstpctl_portadminedge: "{{ item.value.mstpctl_portadminedge|default('no') }}" mstpctl_bpduguard: "{{ item.value.mstpctl_bpduguard|default('no') }}" -with_dict: cl_interfaces +with_dict: "{{ cl_interfaces }}" notify: reload networking