Browse Source

handle creation of ssh certificate when none

python3
Edoardo Putti 6 years ago
parent
commit
57aaf9c123
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      roles/ssh_server/tasks/main.yaml

+ 2
- 1
roles/ssh_server/tasks/main.yaml View File

@ -34,6 +34,7 @@
- name: Validate SSH host certificate if any
ssh_cert:
register: ssh_verification
ignore_errors: yes
- debug:
var: ssh_verification
@ -109,7 +110,7 @@
dest: "/etc/ssh/ssh_host_ed25519_key-cert.pub"
register: set_pub_key
notify: restart ssh
when: not ssh_verification
when: ssh_verification.failed
- name: add certificate to sshd config
lineinfile:


Loading…
Cancel
Save