Skip to content

Instantly share code, notes, and snippets.

@alextaujenis
Last active May 29, 2017 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alextaujenis/f418854c1f4824c4b4e8f9952acbd189 to your computer and use it in GitHub Desktop.
Save alextaujenis/f418854c1f4824c4b4e8f9952acbd189 to your computer and use it in GitHub Desktop.
Ansible generate public/private SSH keys
---
- name: Generate public/private SSH keys for an existing user (will not overwrite existing keys)
user:
name: root
generate_ssh_key: yes
ssh_key_bits: 2048
ssh_key_file: /root/.ssh/id_rsa
state: present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment