Hello,
I’ve been working on a script to provision IIS and a basic website (literally just a html page at the moment) When th escript runs it creates two sites, and the directory for the sites in inetpub/wwwroot/foldername
I’m using this snippet to copy over the index.html file but i can only get it to copy to the first directory.
`
- name: Copy index.html to site directory
win_copy:
src: files/index.html
dest: “{{ ansible_iis_root}}\{{ ansible_site_folder }}\index.html”
`
Could someone explain how i could do this recursively?
Something along the lines of
`
foreach (website in websites) {
win_copy:
src: files/index.html
dest: “{{ ansible_iis_root}}\{{ ansible_site_folder }}\index.html”
}
`
I don’t expect it to work like that ^^, i think i could do something using the loops and with_items but the documentation has fried me. The end goal is when i run the playbook i specify how many sites to provision and as a base it just copies the html file to each one. Can this be done?
Thank you!
Phil
PS: The google groups text e