We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8c72e1 commit 37f5da7Copy full SHA for 37f5da7
tasks/main.yml
@@ -267,4 +267,6 @@
267
- name: Disable weak host keys
268
include_tasks: weak_keys.yml
269
loop: "{{ weak_host_keys }}"
270
+ loop_control:
271
+ loop_var: the_key
272
...
tasks/weak_keys.yml
@@ -1,15 +1,15 @@
1
---
2
-- name: "Check weak key presence for {{ item }}"
+- name: "Check weak key presence for {{ the_key }}"
3
stat:
4
- path: "/etc/ssh/{{ item }}"
+ path: "/etc/ssh/{{ the_key }}"
5
register:
6
weak_key_found
7
8
-- name: "Disable weak host key {{ item }}"
+- name: "Disable weak host key {{ the_key }}"
9
when:
10
- weak_key_found.stat.exists is defined
11
- weak_key_found.stat.exists|bool
12
file:
13
14
mode: 0666
15
0 commit comments