Hi Bill What you are describing, are the extra variables. Please check the docs: https://docs.ansible.com/ansible/2.5/user_guide/playbooks_variables.html#passing-variables-on-the-command-line
Piotr śr., 5 gru 2018 o 13:32 Bill Nolf <[email protected]> napisał(a): > 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 > <https://groups.google.com/d/msgid/ansible-project/31cf6bb1-2dc4-4233-aec9-45a9b80a72c9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CACHJvyO9%2BU-FHDG4C_Fy6N9jqd1BPu%2Bv_AU%2BeyHK1j6wndFgJg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
