change to id_ed25519 keys
This commit is contained in:
parent
4e39958093
commit
d4322019d3
1 changed files with 3 additions and 3 deletions
|
@ -50,15 +50,15 @@
|
|||
|
||||
- name: Check if there is a public key
|
||||
stat:
|
||||
path: /root/.ssh/id_rsa.pub
|
||||
path: /root/.ssh/id_ed25519.pub
|
||||
register: pubkey
|
||||
|
||||
- name: Generate new key if it doesn't exist already
|
||||
shell: ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N ''
|
||||
shell: ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ''
|
||||
when: not pubkey.stat.exists
|
||||
|
||||
- name: Get SSH public key content
|
||||
shell: cat /root/.ssh/id_rsa.pub
|
||||
shell: cat /root/.ssh/id_ed25519.pub
|
||||
register: ssh_pubkey
|
||||
|
||||
- name: Add SSH public key to local (Ansible control node) file
|
||||
|
|
Loading…
Reference in a new issue