Ensure that file 1 (authorized_keys) contains file 2 (id_ed25519.pub)
38 views
Skip to first unread message
Uwe Sauter
unread,
Nov 2, 2015, 5:34:22 PM11/2/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi all,
just beginning my adventure with Ansible.
Following situation: I'm trying to ensure that a user called "ansible" is present on all hosts that should be managed by Ansible.
Creating group and user works so far. Now I'm trying to enable password-less SSH login for that user by copying a well known key
pair to the host.
But I have no idea how to ensure that the authorized_keys file contains the public key. I just could copy
/ansible/.ssh/id_ed25519.pub to /ansible/.ssh/authorized_keys but that might override additional allowed keys.
Can anyone point me to the right module that allows something like the lineinfile module but with that extra dynamic input? I
don't want to specify the content of id_ed25519.pub inside the playbook.
Is there some other solution to this issue?
Best,
Uwe
Brian Coca
unread,
Nov 2, 2015, 6:47:59 PM11/2/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message