Pārlūkot izejas kodu

regenerate ssh keys

master
vecāks
revīzija
ccb7171d49
2 mainītis faili ar 15 papildinājumiem un 0 dzēšanām
  1. +7
    -0
      tasks/main.yml
  2. +8
    -0
      tasks/regenerate.yml

+ 7
- 0
tasks/main.yml Parādīt failu

@@ -1,5 +1,10 @@
---

- include: regenerate.yml
when:
ssh_host_key_state is defined
and ssh_host_key_state == 'regenerated'

- include: scan.yml
when:
ssh_host_key_state is defined
@@ -13,5 +18,7 @@
- include: fetch.yml
when:
not ssh_host_key_state is defined
or ( ssh_host_key_state == 'fetched'
and ssh_host_key_state == 'regenerated' )

- include: save.yml

+ 8
- 0
tasks/regenerate.yml Parādīt failu

@@ -0,0 +1,8 @@
---

- name: delete ssh host keys
shell: rm /etc/ssh/ssh_host_*
register: _ssh_host_keys_delete

- name: reconfigure ssh server
shell: dpkg-reconfigure openssh-server

Notiek ielāde…
Atcelt
Saglabāt