What I'm try to do is create argument string that needs to be run each time 
the name of the vm changes.
The argument contains the name and uses the disk size.

I was able to build an array containing the correct argument string but it 
uses all disks.

example
    --disk name=test1 size 10
    --disk name=test1 size 20
    --disk name=test2 size 20

What I need is
    
    --disk name=test1 size 10
    --disk name=test1 size 10
run command
    
     --disk name=test2 size 20
run command

The number of vms could be 1 to many

thanks



On Tuesday, December 4, 2018 at 2:03:21 PM UTC-5, Bill Nolf wrote:
>
> I have the following vars:
>
> vms
>       test1
>         name: test1
>         disk_size:
>            - size: 10
>            - size: 20
>
>      test2
>         name: test2
>         disk_size:
>             - size: 10
>
> I need to be able to set tasks on test1 and
> then the same set on test2.  Is there a way to do 
> this in ansible?
>
> thanks
>     
>       
>

-- 
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/31cf6bb1-2dc4-4233-aec9-45a9b80a72c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to