4
0
Fork 0

improved find

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2023-01-12 15:01:59 +00:00
parent c129d9af23
commit 876b5d3508
No known key found for this signature in database
GPG key ID: 1DE02A772D0908F9

View file

@ -5,14 +5,17 @@
- name: "4.2.3 | AUDIT | Ensure permissions on all logfiles are configured | find files" - name: "4.2.3 | AUDIT | Ensure permissions on all logfiles are configured | find files"
ansible.builtin.find: ansible.builtin.find:
paths: "/var/log" paths: "/var/log"
type: file file_type: file
recurse: true
register: logfiles register: logfiles
- name: "4.2.3 | AUDIT | Ensure permissions on all logfiles are configured | find files" - name: "4.2.3 | AUDIT | Ensure permissions on all logfiles are configured | find files"
ansible.builtin.file: ansible.builtin.file:
paths: "{{ item.path }}" path: "{{ item.path }}"
mode: 0640 mode: 0640
register: logfiles loop: "{{ logfiles.files }}"
loop_control:
label: "{{ item.path }}"
when: when:
- rhel9cis_rule_4_2_3 - rhel9cis_rule_4_2_3
tags: tags: