Although not the nicest way to do it, I recon the with_sequence could come
in
handy:
http://docs.ansible.com/playbooks_loops.html#looping-over-integer-sequences
On Wednesday, 18 February 2015 18:07:21 UTC+1, Mark Olliver wrote:
>
> Hi,
>
> How can I extend the following code to allow me to specify a number of
> additional volumes to add?
>
> - name: create ec2 vols for raid
> local_action: ec2_vol
> instance="{{ item[0].id }}"
> volume_size="{{ md_vol_size }}"
> device_name="{{ item[1] }}"
> region="{{ item[0].region }}"
> with_nested:
> - ec2_info.instances
> - ['xvdg', 'xvdh', 'xvdi', 'xvdj']
>
>
> I.e sometimes i might want just one additional volume but others i might
> want to attach 10 xvdg-p ideally based of a variable called ec2_vol_count=X
>
> Thanks
>
> Mark
>
--
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/8a27fae2-7e61-4e2c-af09-d99b2a11705e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.