1 --- |
1 --- |
2 |
2 |
3 - include: dist-debian.yml |
3 - include: dist-debian.yml |
4 when: ansible_os_family == 'Debian' |
4 when: ansible_os_family == 'Debian' |
5 |
5 |
|
6 - name: "ssh : Ensure known_hosts keys" |
|
7 lineinfile: |
|
8 dest: /etc/ssh/ssh_known_hosts |
|
9 state: present |
|
10 line: "{{item.value}}" |
|
11 create: true |
|
12 mode: 0644 |
|
13 with_dict: "{{hostkeys}}" |
|
14 tags: ssh |
6 |
15 |
|
16 - name: "ssh : Purge invalid known_hosts keys" |
|
17 lineinfile: |
|
18 dest: /etc/ssh/ssh_known_hosts |
|
19 state: absent |
|
20 line: "{{item.value}}" |
|
21 with_dict: "{{hostkeys_removed}}" |
|
22 tags: ssh |