Merge "Correct issue with ansible hardening and systemd"
This commit is contained in:
commit
ce0340fafe
@ -36,22 +36,14 @@
|
||||
- V-71985
|
||||
|
||||
# This returns an exit code of 0 if it's running, 3 if it's masked.
|
||||
- name: Check if ctrl-alt-del.target is already masked
|
||||
command: systemctl status ctrl-alt-del.target
|
||||
register: cad_mask_check
|
||||
check_mode: no
|
||||
changed_when: False
|
||||
failed_when: cad_mask_check.rc not in [0,3]
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: V-71993 - The x86 Ctrl-Alt-Delete key sequence must be disabled
|
||||
command: systemctl mask ctrl-alt-del.target
|
||||
systemd:
|
||||
name: ctrl-alt-del.target
|
||||
enabled: no
|
||||
masked: yes
|
||||
daemon_reload: yes
|
||||
when:
|
||||
- security_rhel7_disable_ctrl_alt_delete | bool
|
||||
- cad_mask_check.rc != 3
|
||||
notify:
|
||||
- reload systemd
|
||||
tags:
|
||||
- high
|
||||
- misc
|
||||
|
Loading…
x
Reference in New Issue
Block a user