Created
August 9, 2018 02:34
-
-
Save chuckersjp/77863ce1d27b12d1da288e589aabf24e to your computer and use it in GitHub Desktop.
Ansible command to push out keys to all hosts. Requires that the account be present and the password be the same.
This file contains hidden or 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 inventory all -m authorized_key -a "user=ansible key={{ lookup('file', '/home/ansible/.ssh/id_rsa.pub') }}" -k |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment