forked from ansible-lockdown/RHEL9-CIS
crypto idempotency
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
b0e038bd45
commit
c3c668bb8e
1 changed files with 15 additions and 4 deletions
|
|
@ -271,10 +271,21 @@
|
||||||
- rule_5.2.13
|
- rule_5.2.13
|
||||||
|
|
||||||
- name: "5.2.14 | PATCH | Ensure system-wide crypto policy is not over-ridden"
|
- name: "5.2.14 | PATCH | Ensure system-wide crypto policy is not over-ridden"
|
||||||
shell: sed -ri "s/^\s*(CRYPTO_POLICY\s*=.*)$/# \1/" /etc/sysconfig/sshd
|
block:
|
||||||
args:
|
- name: "5.2.14 | AUDIT | Ensure system-wide crypto policy is not over-ridden"
|
||||||
warn: no
|
shell: grep -i '^\s*CRYPTO_POLICY=' /etc/sysconfig/sshd
|
||||||
notify: restart sshd
|
args:
|
||||||
|
warn: no
|
||||||
|
changed_when: false
|
||||||
|
failed_when: ( ssh_crypto_discovery.rc not in [ 0, 1 ] )
|
||||||
|
register: ssh_crypto_discovery
|
||||||
|
|
||||||
|
- name: "5.2.14 | PATCH | Ensure system-wide crypto policy is not over-ridden"
|
||||||
|
shell: sed -ri "s/^\s*(CRYPTO_POLICY\s*=.*)$/# \1/" /etc/sysconfig/sshd
|
||||||
|
args:
|
||||||
|
warn: no
|
||||||
|
notify: restart sshd
|
||||||
|
when: ssh_crypto_discovery.stdout | length > 0
|
||||||
when:
|
when:
|
||||||
- rhel9cis_rule_5_2_14
|
- rhel9cis_rule_5_2_14
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue