Skip to content

Instantly share code, notes, and snippets.

@nailgun
Created March 2, 2016 09:33
Show Gist options
  • Save nailgun/1e36695655765cfa0959 to your computer and use it in GitHub Desktop.
Save nailgun/1e36695655765cfa0959 to your computer and use it in GitHub Desktop.
Ansible generate SSH key
---
- hosts: all
tasks:
- name: ensure SSH key is generated
command: ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''
args:
creates: /root/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment