I’d really like to do something like this:
- name: uploading ssh keys
action: authorized_key user={{ item.username }}
key=“{{ lookup(‘file’, ‘keys/ssh.{{ item.username }}.pub’) }}”
with_items: users
but the lookup plugin does not support substitution like that (I guess). Is there a simple workaround to include
the keys from files and still use the authorized_key module? Otherwise, I’m going to have to just copy them over.
J