I have the following variable loaded via include_vars
:
access:
username-foo:
- path: /
permissions: rwX
recursive: true
username-bar:
- path: /
permissions: rX
- path: /css
permissions: rwX
recursive: true
- path: /data
permissions: rX
- path: /data/reviews.yml
permissions: rw
- path: /js
permissions: rX
- path: /js/*.js
permissions: rw
I want to feed this information to the shell
command in order to set appropriate permissions.
I've tried some techniques from here: http://docs.ansible.com/playbooks_loops.html but failed to come up with working solution.
Is it possible to iterate this structure? If not, how do I re-structure it in order to make it work? Is it possible to do this without breaking the DRY rule (e.g. include username into every record)?