4
0
Fork 0

Merge pull request #11 from ansible-lockdown/audit_vars

Add the ability to pass/change environment variable- current workflow failure expected
This commit is contained in:
uk-bolly 2022-05-04 16:32:07 +01:00 committed by GitHub
commit e93d1ca735
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View file

@ -622,6 +622,12 @@ rhel9cis_passwd_label: "{{ (this_item | default(item)).id }}: {{ (this_item | de
# 6.2.9
rhel9cis_dotperm_ansiblemanaged: true
#### Goss Configuration Settings ####
# Set correct env for the run_audit.sh script from https://github.com/ansible-lockdown/{{ benchmark }}-Audit.git"
audit_run_script_environment:
AUDIT_BIN: "{{ audit_bin }}"
AUDIT_FILE: 'goss.yml'
AUDIT_CONTENT_LOCATION: "{{ audit_out_dir }}"
### Goss binary settings ###
goss_version:

View file

@ -2,6 +2,9 @@
- name: "Post Audit | Run post_remediation {{ benchmark }} audit"
shell: "{{ audit_conf_dir }}/run_audit.sh -v {{ audit_vars_path }} -o {{ post_audit_outfile }} -g {{ group_names }}"
environment: "{{ audit_run_script_environment|default({}) }}"
changed_when: audit_run_post_remediation.rc == 0
register: audit_run_post_remediation
args:
warn: false

View file

@ -86,6 +86,9 @@
- name: "Pre Audit | Run pre_remediation {{ benchmark }} audit"
shell: "{{ audit_conf_dir }}/run_audit.sh -v {{ audit_vars_path }} -o {{ pre_audit_outfile }} -g {{ group_names }}"
environment: "{{ audit_run_script_environment|default({}) }}"
changed_when: audit_run_pre_remediation.rc == 0
register: audit_run_pre_remediation
args:
warn: false