Merge "Correct issue with ansible hardening and systemd"

This commit is contained in:
Zuul 2018-08-24 16:35:23 +00:00 committed by Gerrit Code Review
commit ce0340fafe
1 changed files with 5 additions and 13 deletions

View File

@ -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