Added greate logfile logic is file changed

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2024-08-20 16:07:27 +01:00
parent 86260d8630
commit 6128104385
No known key found for this signature in database
GPG key ID: 997FF7FE93AEB5B9

View file

@ -27,6 +27,8 @@
ansible.builtin.file:
path: "{{ item }}"
mode: 'u-x,g-wx,o-rwx'
failed_when: rhel9cis_logfile_list.state not in '[ file, absent ]'
register: rhel9cis_logfile_list
loop: "{{ discovered_logfiles.stdout_lines }}"
- name: "6.2.4.1 | PATCH | Ensure access to all logfiles has been configured | change permissions"
@ -36,6 +38,8 @@
ansible.builtin.file:
path: "{{ item }}"
mode: 'u-x,g-x,o-rwx'
failed_when: rhel9cis_logfile_list.state not in '[ file, absent ]'
register: rhel9cis_logfile_list
loop: "{{ discovered_logfiles.stdout_lines }}"
- name: "6.2.4.1 | PATCH | Ensure access to all logfiles has been configured | change permissions"
@ -49,4 +53,6 @@
ansible.builtin.file:
path: "{{ item }}"
mode: 'ug-x,o-wx'
failed_when: rhel9cis_logfile_list.state not in '[ file, absent ]'
register: rhel9cis_logfile_list
loop: "{{ discovered_logfiles.stdout_lines }}"