Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to supress the package logging facts #84

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,3 +1234,8 @@ audit_run_script_environment:
AUDIT_BIN: "{{ audit_bin }}"
AUDIT_FILE: 'goss.yml'
AUDIT_CONTENT_LOCATION: "{{ audit_out_dir }}"

#### 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
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
- name: Gather the package facts
ansible.builtin.package_facts:
manager: auto
no_log: "{{ suppress_package_facts_logging | default(false) }}"
tags:
- always

Expand Down
2 changes: 2 additions & 0 deletions tasks/parse_etc_password.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
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