diff --git a/tasks/regenerate.yml b/tasks/regenerate.yml index dc7c7ee..5f88ba9 100644 --- a/tasks/regenerate.yml +++ b/tasks/regenerate.yml @@ -1,7 +1,11 @@ --- - name: delete ssh host keys - shell: rm /etc/ssh/ssh_host_* + file: + path: "{{item}}" + state: absent + with_fileglob: + - /etc/ssh/ssh_host_* register: _ssh_host_keys_delete - name: reconfigure ssh server