Created
March 7, 2015 07:46
-
-
Save mindware/9fbfcc94abde630aa88c to your computer and use it in GitHub Desktop.
Distribute your SSH-keys to all your hosts using Ansible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible -i ~/ansible/hosts -m authorized_key -a "key='{{ lookup('file', '/home/YOURUSER/.ssh/id_rsa.pub') }}' user=YOURUSER" -u YOURUSER all -k |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment