keymap:
userx:
property1: xyz
property2: abc
usery:
property1: xyz
property2: abc$ /tmp/pub_keys/username_hostnamelookup('file', '/tmp/pub_keys/username_'+ansible_hostname+'.pub' )lookup('fileglob', '/tmp/pub_keys/username_'+'*'+'.pub').split(',')- name: give users access to multiple databases
authorized_key: user="{{item.0}}" key="{{lookup('file', item.1)}}"
with_nested:
- {{users}}
- key: "{{ lookup('fileglob', '/tmp/public_keys/'+item.key+'_'+ansible_hostname+'.pub').splitlines() }}"
"{{ lookup('fileglob', ... and so on till the end of the string.tl,dr
Is it possible to use, with_dict together with with_file to achieve a nested-loop construct in ansible 1.7.2? It seems not.
And especially so after reading the 2nd answer to this question: https://stackoverflow.com/questions/31566568/double-loop-ansible
p.s. why ansible 1.7.2, it comes standard with Debian 8.5 (jessie)?