5.4.3.3 updated to add profile script
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
9709aa503b
commit
cc307541a9
|
@ -34,7 +34,7 @@
|
||||||
state: "{{ item.state }}"
|
state: "{{ item.state }}"
|
||||||
marker: "# {mark} - CIS benchmark - Ansible-lockdown"
|
marker: "# {mark} - CIS benchmark - Ansible-lockdown"
|
||||||
create: true
|
create: true
|
||||||
mode: 'go-w'
|
mode: 'go-wx'
|
||||||
block: |
|
block: |
|
||||||
TMOUT={{ ubtu24cis_shell_session_timeout }}
|
TMOUT={{ ubtu24cis_shell_session_timeout }}
|
||||||
readonly TMOUT
|
readonly TMOUT
|
||||||
|
@ -54,10 +54,20 @@
|
||||||
- rule_5.4.3.3
|
- rule_5.4.3.3
|
||||||
- NIST800-53R5_AC-3
|
- NIST800-53R5_AC-3
|
||||||
- NIST800-53R5_MP-2
|
- NIST800-53R5_MP-2
|
||||||
ansible.builtin.replace:
|
block:
|
||||||
path: "{{ item.path }}"
|
- name: "5.4.3.3 | PATCH | Ensure default user umask is configured | update current settings"
|
||||||
regexp: (?i)(umask\s+\d\d\d)
|
ansible.builtin.replace:
|
||||||
replace: '{{ item.line }} {{ ubtu24cis_bash_umask }}'
|
path: "{{ item.path }}"
|
||||||
loop:
|
regexp: (?i)(umask\s+\d\d\d)
|
||||||
- { path: '/etc/profile', line: 'umask' }
|
replace: '{{ item.line }} {{ ubtu24cis_bash_umask }}'
|
||||||
- { path: '/etc/login.defs', line: 'UMASK' }
|
loop:
|
||||||
|
- { path: '/etc/profile', line: 'umask' }
|
||||||
|
- { path: '/etc/login.defs', line: 'UMASK' }
|
||||||
|
|
||||||
|
- name: "5.4.3.3 | PATCH | Ensure default user umask is configured | add profile script to set"
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: etc/profile.d/50-umask.sh.j2
|
||||||
|
dest: /etc/profile.d/50-umask.sh
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 'go+r,go-wx'
|
||||||
|
|
Loading…
Reference in New Issue