Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit 31c4895

Browse files
authored
Merge pull request #267 from jbronn/moduli-when-hardening
Only manage moduli when hardening server
2 parents be3317d + d57f65e commit 31c4895

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tasks/hardening.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@
5555
register: sshd_register_moduli
5656
changed_when: false
5757
check_mode: no
58+
when: ssh_server_hardening | bool
5859

5960
- name: remove all small primes
6061
shell: awk '$5 >= {{ sshd_moduli_minimum }}' {{ sshd_moduli_file }} > {{ sshd_moduli_file }}.new ;
6162
[ -r {{ sshd_moduli_file }}.new -a -s {{ sshd_moduli_file }}.new ] && mv {{ sshd_moduli_file }}.new {{ sshd_moduli_file }} || true
6263
notify: restart sshd
63-
when: sshd_register_moduli.stdout
64+
when:
65+
- ssh_server_hardening | bool
66+
- sshd_register_moduli.stdout
6467

6568
- name: include tasks to setup ca keys and principals
6669
include_tasks: ca_keys_and_principals.yml

0 commit comments

Comments
 (0)