Skip to content

Commit

Permalink
fix: Don't log config deployments
Browse files Browse the repository at this point in the history
Avoid logging on some config files may contain secrets.

Fixes: #72

Signed-off-by: prombot <prometheus-team@googlegroups.com>
  • Loading branch information
prombot committed Mar 17, 2023
1 parent 045d154 commit e39934b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions roles/alertmanager/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
group: alertmanager
mode: 0644
validate: "{{ _alertmanager_binary_install_dir }}/amtool check-config %s"
no_log: "{{ 'false' if lookup('env', 'CI') else 'true' }}"
notify:
- restart alertmanager

Expand Down
1 change: 1 addition & 0 deletions roles/mysqld_exporter/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
owner: root
group: root
mode: 0644
no_log: "{{ 'false' if lookup('env', 'CI') else 'true' }}"
notify: restart mysqld_exporter

- name: Configure mysqld_exporter web config
Expand Down
1 change: 1 addition & 0 deletions roles/prometheus/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
group: prometheus
mode: 0640
validate: "{{ _prometheus_binary_install_dir }}/promtool check config %s"
no_log: "{{ 'false' if lookup('env', 'CI') else 'true' }}"
notify:
- reload prometheus

Expand Down
1 change: 0 additions & 1 deletion roles/snmp_exporter/molecule/alternative/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
roles:
- prometheus.prometheus.snmp_exporter
vars:
__testing_on_travis: true
snmp_exporter_web_listen_address: "127.0.0.1:9116"
snmp_exporter_config_file: snmp.yml
1 change: 0 additions & 1 deletion roles/snmp_exporter/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
roles:
- prometheus.prometheus.snmp_exporter
vars:
__testing_on_travis: true
snmp_exporter_web_listen_address: "127.0.0.1:9116"
2 changes: 1 addition & 1 deletion roles/snmp_exporter/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
owner: root
group: root
mode: 0644
no_log: "{{ 'true' if __testing_on_travis is defined else 'false' }}"
no_log: "{{ 'false' if lookup('env', 'CI') else 'true' }}"
notify:
- reload snmp exporter
when: (snmp_exporter_config_file)

0 comments on commit e39934b

Please sign in to comment.