If the key file to read is not found, shouldn't the authorized_key module
report an error?
Have this in a playbook
- name: Manage keys for users
authorized_key: user={{item.uname}}
key="{{lookup('file','~/Ansible/keys/' + item.uname + '/authorized_keys2')
}}"
manage_dir=yes
path='/home/{{item.uname}}/.ssh/authorized_keys2'
with_items: Ops
I originally had the folder "Ansible" called something else. Upon rename
keys stopped getting installed, but the module did not report an error.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/f33e8a28-d3e1-45c3-95c5-613e5140b35c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.