Skip to content

Commit

Permalink
use manual line-wrapping because ansible-lint does not support it cor…
Browse files Browse the repository at this point in the history
…rectly.

see ansible/ansible-lint#2522

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
  • Loading branch information
Sebastian Gumprich committed Nov 28, 2022
1 parent 7cafe0a commit ad9ccd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions roles/ssh_hardening/tasks/hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@
when: ssh_server_hardening | bool

- name: Remove all small primes
ansible.builtin.shell: awk '$5 >= {{ sshd_moduli_minimum }}' {{ sshd_moduli_file }} > {{ sshd_moduli_file }}.new ; [ -r {{ sshd_moduli_file }}.new -a -s {{ sshd_moduli_file
}}.new ] && mv {{ sshd_moduli_file }}.new {{ sshd_moduli_file }} || true
ansible.builtin.shell: >
awk '$5 >= {{ sshd_moduli_minimum }}' {{ sshd_moduli_file }} > {{ sshd_moduli_file }}.new ; [ -r {{ sshd_moduli_file }}.new
-a -s {{ sshd_moduli_file }}.new ] && mv {{ sshd_moduli_file }}.new {{ sshd_moduli_file }} || true
notify: Restart sshd
when:
- ssh_server_hardening | bool
Expand Down

0 comments on commit ad9ccd8

Please sign in to comment.