[ansible-devel] Re: Repeat a task based on a csv string from extra_var

2018-03-19 Thread GoFigure
This has been answered here 


Thanks

On Monday, March 19, 2018 at 12:48:41 PM UTC+11, GoFigure wrote:
>
> Or should this sort of thing be done via a module?
>
> Thanks
>
> On Wednesday, March 14, 2018 at 2:30:07 PM UTC+11, GoFigure wrote:
>>
>>
>> Hello All,
>>
>> I am a complete newbie and have only spent hours reading about ansible 
>> and topics this forum. I have been (un;)fortunate to work with ansible 
>> devs, so haven't had to get my hands dirty. Anyway here I am and ready to 
>> get my hands dirty. There is a specific nut I am trying to crack in 
>> ansible. We want to dev a job template that add disks to and server 
>> instance. The size and number of disk will be provided as an extra_var csv 
>> string, eg. 10,100,25,200 would add 4 disks of sizes 10GB, 100GB, 25GB & 
>> 200GB. We have the task ready and it works, so adding one disk is not a 
>> problem, but how do we then repeat that task for the next disk? Its not a 
>> question of nuts and bolts of adding disks, its a question how do we take 
>> the csv string (not file) and then loop the task.
>>
>> Looks like this is possible in Ansible, as per the below articles.
>> http://docs.ansible.com/ansible/latest/playbooks_loops.html
>>
>> https://groups.google.com/forum/#!searchin/ansible-project/.split$20with_items$20comma|sort:date/ansible-project/jpqKAXezl40/TItF3W48AAAJ
>>
>> https://groups.google.com/forum/#!searchin/ansible-project/.split|sort:date/ansible-project/QmvdMpaLxwY/Czv0irDoCgAJ
>>
>> https://groups.google.com/forum/#!searchin/ansible-project/.split|sort:date/ansible-project/x2MCN2Qc4GU/fQSvxJEiAQAJ
>>
>> Thanks
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-devel] Re: Repeat a task based on a csv string from extra_var

2018-03-18 Thread GoFigure
Or should this sort of thing be done via a module?

Thanks

On Wednesday, March 14, 2018 at 2:30:07 PM UTC+11, GoFigure wrote:
>
>
> Hello All,
>
> I am a complete newbie and have only spent hours reading about ansible and 
> topics this forum. I have been (un;)fortunate to work with ansible devs, so 
> haven't had to get my hands dirty. Anyway here I am and ready to get my 
> hands dirty. There is a specific nut I am trying to crack in ansible. We 
> want to dev a job template that add disks to and server instance. The size 
> and number of disk will be provided as an extra_var csv string, eg. 
> 10,100,25,200 would add 4 disks of sizes 10GB, 100GB, 25GB & 200GB. We have 
> the task ready and it works, so adding one disk is not a problem, but how 
> do we then repeat that task for the next disk? Its not a question of nuts 
> and bolts of adding disks, its a question how do we take the csv string 
> (not file) and then loop the task.
>
> Looks like this is possible in Ansible, as per the below articles.
> http://docs.ansible.com/ansible/latest/playbooks_loops.html
>
> https://groups.google.com/forum/#!searchin/ansible-project/.split$20with_items$20comma|sort:date/ansible-project/jpqKAXezl40/TItF3W48AAAJ
>
> https://groups.google.com/forum/#!searchin/ansible-project/.split|sort:date/ansible-project/QmvdMpaLxwY/Czv0irDoCgAJ
>
> https://groups.google.com/forum/#!searchin/ansible-project/.split|sort:date/ansible-project/x2MCN2Qc4GU/fQSvxJEiAQAJ
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.