Skip to content

Commit a12d7fb

Browse files
committed
Add no_log option to enhance security and reduce sensitive data exposure in configuration checks
1 parent 8f8b6aa commit a12d7fb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/playbook_00_configuration_checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@
441441

442442
- name: "Render HTML report for configuration checks"
443443
ansible.builtin.include_tasks: "./roles/misc/tasks/render-html-report.yml"
444+
no_log: true
444445
vars:
445446
html_template_name: "./templates/config_checks_report.html"
446447
report_file_name: "CONFIG_{{ sap_sid | upper }}_{{ platform | upper }}"

src/roles/configuration_checks/tasks/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
- role in ['SCS', 'ERS', 'DB']
5151

5252
- name: "{{ check_type.name }} - Prepare system context information"
53+
no_log: true
5354
ansible.builtin.set_fact:
5455
system_context:
5556
check_type: "{{ check_type }}"
@@ -97,7 +98,7 @@
9798
- name: "{{ check_type.name }} - Debug system context prepared"
9899
ansible.builtin.debug:
99100
var: system_context | default({})
100-
verbosity: 1
101+
verbosity: 2
101102

102103
- name: Load checks file for {{ check_type.name }} from {{ check_type.file_name }}.yml
103104
no_log: true
@@ -131,6 +132,7 @@
131132
block:
132133
- name: "{{ check_type.name }} - Run command-based configuration checks"
133134
become: true
135+
no_log: true
134136
configuration_check_module:
135137
check_file_content: "{{ command_checks_yaml }}"
136138
context: "{{ system_context }}"
@@ -164,6 +166,7 @@
164166
block:
165167
- name: Run Azure-based configuration checks
166168
become: true
169+
no_log: true
167170
delegate_to: localhost
168171
configuration_check_module:
169172
check_file_content: "{{ azure_checks_yaml }}"
@@ -198,6 +201,7 @@
198201
block:
199202
- name: Run module-based configuration checks
200203
become: true
204+
no_log: true
201205
configuration_check_module:
202206
check_file_content: "{{ module_checks_yaml }}"
203207
context: "{{ system_context }}"
@@ -244,6 +248,7 @@
244248
execution_errors: "{{ execution_errors | default([]) }}"
245249

246250
- name: "{{ check_type.name }} - Set dynamic result variable with metadata"
251+
no_log: true
247252
ansible.builtin.set_fact:
248253
"{{ check_type.results_var }}": "{{ combined_results }}"
249254
"{{ check_type.results_var }}_metadata": "{{ execution_summary }}"

0 commit comments

Comments
 (0)