Skip to content

Instantly share code, notes, and snippets.

@zacker330
Last active January 21, 2018 04:24
Show Gist options
  • Save zacker330/7425bc6f1a5be45ce42daf7727832f07 to your computer and use it in GitHub Desktop.
Save zacker330/7425bc6f1a5be45ce42daf7727832f07 to your computer and use it in GitHub Desktop.
ansible -i inventory all -m authorized_key \
-a "user=vagrant key='{{ lookup('file', '/Users/jack/.ssh/id_rsa.pub') }}' path=/home/vagrant/.ssh/authorized_keys manage_dir=no" -u vagrant -k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment