Try to give the groups different names.
You can use:
with_items:
- ip: addr1/32
name: group1
And then access that data with {{ item.ip }} and {{ item.name }}.
Chuzzy <[email protected]> napisał:
>
>Thanks for the response .. much appreciated.
>
>And yes, I have seen that's the only way it works ,, I do ponder what I
>
>have to do to have it create a security group per item element(s) .. or
>is
>this an incorrect usage?
>
>Thanks again ..
>
>On Monday, 4 August 2014 21:22:08 UTC+1, Michael DeHaan wrote:
>>
>> You have an indentation error here for starters:
>>
>> - name: Create security group
>> ec2_group:
>> name: "some-name"
>> description: "some description"
>> vpc_id: "vpc-blahblah"
>> region: "eu-north-4"
>> rules:
>> - proto: tcp
>> from_port: 443
>> to_port: 443
>> cidr_ip: "{{ item }}"
>> with_items:
>> - addr1/32
>> - addr2/32
>> - etc/32
>>
>> with_items should be at the same level as "ec2_group".
>>
>>
>>
>
>--
>You received this message because you are subscribed to the Google
>Groups "Ansible Project" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to [email protected].
>To post to this group, send email to [email protected].
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/ansible-project/f475c9b9-08d1-41ad-acdd-0ef3a6e6d879%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.
--
Wysłane za pomocą K-9 Mail.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8a94986f-32fd-44bb-b14a-c74b57fa56b3%40email.android.com.
For more options, visit https://groups.google.com/d/optout.