Skip to content
This repository was archived by the owner on Aug 18, 2023. It is now read-only.

Commit 76f1022

Browse files
authored
Mask environment configuration with no_log
Environment files are frequently used to inject sensitive values to daemons. This change enables the no_log flag on this task. Alternatively, we could have two tasks that do the same thing and require users to opt out/in like such: ```yaml prometheus_my_exporter_env_vars: foo: 'not a secret, i like my diffs' prometheus_my_exporter_env_insensitive: true ```
1 parent 378b74a commit 76f1022

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tasks/_service.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
notify:
2424
- Restart Prometheus service
2525
when: prometheus_software_env_vars is defined and prometheus_software_env_vars
26+
no_log: True
2627

2728
- name: Include task to setup {{ prometheus_software_name_version }} {{ ansible_service_mgr }} service
2829
include_tasks: '_service_mgr_{{ ansible_service_mgr | regex_replace("^(openrc|upstart)$", "init") }}.yml'

0 commit comments

Comments
 (0)