Merge "Correct issue with ansible hardening and systemd"
This commit is contained in:
@@ -36,22 +36,14 @@
|
|||||||
- V-71985
|
- V-71985
|
||||||
|
|
||||||
# This returns an exit code of 0 if it's running, 3 if it's masked.
|
# 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
|
- 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:
|
when:
|
||||||
- security_rhel7_disable_ctrl_alt_delete | bool
|
- security_rhel7_disable_ctrl_alt_delete | bool
|
||||||
- cad_mask_check.rc != 3
|
|
||||||
notify:
|
|
||||||
- reload systemd
|
|
||||||
tags:
|
tags:
|
||||||
- high
|
- high
|
||||||
- misc
|
- misc
|
||||||
|
Reference in New Issue
Block a user