fixup! Per Device SSH-Keys
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-09-14 14:54:09 +02:00
parent e6255c76e3
commit 6976503097
2 changed files with 5 additions and 7 deletions

View File

@ -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