fixup! Per Device SSH-Keys
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
---
|
||||
- name: Generate SSH Keys
|
||||
hosts: all
|
||||
serial: 1
|
||||
tasks:
|
||||
- name: Check for ssh key present
|
||||
shell: "passage machine/{{ inventory_hostname }}/ssh_key"
|
||||
@ -10,7 +11,7 @@
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
- name: Generate ssh_key
|
||||
shell: "openssl genpkey -algorithm ed25519 | passage insert --multiline machine/{{ inventory_hostname }}/ssh_key"
|
||||
shell: "( exec 3>&1 ; ssh-keygen -qt ed25519 -f /proc/self/fd/3 <<<y >/dev/null 2>&1 ) | passage insert --multiline machine/{{ inventory_hostname }}/ssh_key"
|
||||
delegate_to: localhost
|
||||
when: ssh_key.rc != 0
|
||||
register: new_ssh_key
|
||||
|
Reference in New Issue
Block a user