Just starting out with Ansible. Currently I’ve got:
`
Just starting out with Ansible. Currently I’ve got:
`
Check out looping over subelements http://docs.ansible.com/playbooks_loops.html#looping-over-subelements
This could get unwieldy quickly but is there some reason why you can’t use…
This has the big advantage over the commands version that it is actually idempotent. If it has to remove the files it will, but if they are already gone it will report that the task was ‘OK’. Your version might well report failed if the file no longer exists.
Adam