forked from ansible-lockdown/RHEL9-CIS
updated logic 6.1.11
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
3c08540062
commit
82c1137b94
1 changed files with 5 additions and 14 deletions
|
|
@ -177,8 +177,6 @@
|
|||
vars:
|
||||
warn_control_id: '6.1.10'
|
||||
when: discovered_unowned_files_flatten | length > 0
|
||||
vars:
|
||||
rhel_09_6_1_10_unowned_files_found: false
|
||||
when:
|
||||
- rhel9cis_rule_6_1_10
|
||||
tags:
|
||||
|
|
@ -204,28 +202,21 @@
|
|||
- item['device'].startswith('/dev')
|
||||
- not 'bind' in item['options']
|
||||
|
||||
- name: "6.1.11 | AUDIT | Ensure no ungrouped files or directories exist | set fact"
|
||||
- name: "6.1.11 | AUDIT | Ensure no ungrouped files or directories exist | Flatten no_user_items results for easier use"
|
||||
ansible.builtin.set_fact:
|
||||
rhel_09_6_1_11_ungrouped_files_found: true
|
||||
loop: "{{ rhel_09_6_1_11_audit.results }}"
|
||||
when:
|
||||
- item | length > 0
|
||||
- item.stdout is defined # skipped items are part of results list, but don't have the registered module properties
|
||||
- item.stdout | length > 0
|
||||
discovered_ungrouped_files_flatten: "{{ rhel_09_6_1_11_audit.results | map(attribute='stdout_lines') | flatten }}"
|
||||
|
||||
- name: "6.1.11 | AUDIT | Ensure no ungrouped files or directories exist | Displaying all ungrouped files or directories"
|
||||
ansible.builtin.debug:
|
||||
msg: "Warning!! Missing group on items in {{ rhel_09_6_1_11_audit.stdout_lines }}"
|
||||
when: rhel_09_6_1_11_ungrouped_files_found
|
||||
msg: "Warning!! Missing group on items in {{ discovered_ungrouped_files_flatten }}"
|
||||
when: discovered_ungrouped_files_flatten | length > 0
|
||||
|
||||
- name: "6.1.11 | AUDIT | Ensure no ungrouped files or directories exist | warning"
|
||||
ansible.builtin.import_tasks:
|
||||
file: warning_facts.yml
|
||||
vars:
|
||||
warn_control_id: '6.1.11'
|
||||
when: rhel_09_6_1_11_ungrouped_files_found
|
||||
vars:
|
||||
rhel_09_6_1_11_ungrouped_files_found: false
|
||||
when: discovered_ungrouped_files_flatten | length > 0
|
||||
when:
|
||||
- rhel9cis_rule_6_1_11
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue