Skip to content

Commit

Permalink
adding suppress_etc_passwd_logging variable
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Brody <[email protected]>
  • Loading branch information
dannybrody committed Jul 16, 2024
1 parent 9eb6d35 commit e5a729d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1238,3 +1238,4 @@ audit_run_script_environment:
#### Logging Configuration Settings ####
# Set to true in order to supress the various tasks from logging
suppress_package_facts_logging: false
suppress_etc_passwd_logging: false
3 changes: 3 additions & 0 deletions tasks/parse_etc_password.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
changed_when: false
check_mode: false
register: amzn2023cis_passwd_file_audit
no_log: "{{ suppress_etc_passwd_logging | default(false) }}"


- name: "PRELIM | 5.5.2 | 6.2.7 | 6.2.8 | 6.2.20 | Split passwd entries"
ansible.builtin.set_fact:
amzn2023cis_passwd: "{{ amzn2023cis_passwd_file_audit.stdout_lines | map('regex_replace', ld_passwd_regex, ld_passwd_yaml) | map('from_yaml') | list }}"
no_log: "{{ suppress_etc_passwd_logging | default(false) }}"
loop: "{{ amzn2023cis_passwd_file_audit.stdout_lines }}"
vars:
ld_passwd_regex: >-
Expand Down
1 change: 1 addition & 0 deletions tasks/prelim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,5 +292,6 @@
- name: "PRELIM | Gather the package facts after prelim"
ansible.builtin.package_facts:
manager: auto
no_log: "{{ suppress_package_facts_logging | default(false) }}"
tags:
- always

0 comments on commit e5a729d

Please sign in to comment.