I am trying to create multiple different directory structure using the with_items and again i need to refer the same directory structure in the other plays in the playbook.
for example
- file: name=/jenkins/data/{{item.dir1}}/{{item.dir2}}
with_items:
- {dir1: str-build, dir2: gitconfig_dev}
- {dir1: btr-build, dir2: gitconfig_test}
- {dir1: ctr-build, dir2: gitconfig_test6}
......................................
there are around 20 items like this
......................................
same variable i need to refer in the other play like
- git: repo=
http://github/..... dest=/jenkins/data/{{item1.dir1}}/{{item.dir2}} clone=yes
with_items:
- {dir1: str-build, dir2: gitconfig_dev}
- {dir1: btr-build, dir2: gitconfig_test}
- {dir1: ctr-build, dir2: gitconfig_test6}
Again in some other play ...so how do i make this
global so that we define once
with_items and use it in all the other play..
thank you.