mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-26 13:00:18 +01:00
Hide changes to temporary files
This commit is contained in:
parent
567708dff6
commit
a1ee1c0f77
1 changed files with 3 additions and 0 deletions
|
@ -70,12 +70,14 @@
|
||||||
tempfile:
|
tempfile:
|
||||||
state: directory
|
state: directory
|
||||||
register: sshd_test_hostkey
|
register: sshd_test_hostkey
|
||||||
|
changed_when: False
|
||||||
when:
|
when:
|
||||||
- __sshd_hostkeys_from_config | from_json == []
|
- __sshd_hostkeys_from_config | from_json == []
|
||||||
- sshd_config_file != "/etc/ssh/sshd_config"
|
- sshd_config_file != "/etc/ssh/sshd_config"
|
||||||
|
|
||||||
- name: Generate temporary hostkey
|
- name: Generate temporary hostkey
|
||||||
shell: "ssh-keygen -q -t rsa -f {{ sshd_test_hostkey.path }}/rsa_key -C '' -N ''"
|
shell: "ssh-keygen -q -t rsa -f {{ sshd_test_hostkey.path }}/rsa_key -C '' -N ''"
|
||||||
|
changed_when: False
|
||||||
when: sshd_test_hostkey.path is defined
|
when: sshd_test_hostkey.path is defined
|
||||||
|
|
||||||
- name: Create the configuration file
|
- name: Create the configuration file
|
||||||
|
@ -102,6 +104,7 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ sshd_test_hostkey.path }}"
|
path: "{{ sshd_test_hostkey.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
changed_when: False
|
||||||
when: sshd_test_hostkey.path is defined
|
when: sshd_test_hostkey.path is defined
|
||||||
|
|
||||||
- name: Install systemd service files
|
- name: Install systemd service files
|
||||||
|
|
Loading…
Reference in a new issue