Dhaval Joshi
unread,Feb 13, 2017, 9:07:20 AM2/13/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hello,
I am new to ansible, i have requirement.
vars:
locations:
- parentlocation: A
childlocation:
- a1
- a2
- a3
- parentlocation: B
childlocation:
- b1
- b2
- b3
Now i want run task so
- name: create parent location
command:
some command '{{ parentlocation }}' create
- name: create child loc aslo pass parent of it
command:
some command '{{ parentlocation }}' --child '{{ childlocation[0,1,3..]
How do i iterate ??
Basically i wilk create parent locatuon and when i create child location i need to pass its parent as well so it creates hierarchies
Thanks,
Dj