File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ homestack_monitoring_base_domain: example.com
3939# renovate: image=prom/prometheus
4040homestack_monitoring_prometheus_image_version : v2.55.1
4141# homestack_monitoring_prometheus_base_path: "" # must be set
42+ # homestack_monitoring_prometheus_basic_auth_user: "" # must be set
43+ # homestack_monitoring_prometheus_basic_auth_password: "" # must be set
4244# renovate: image=grafana/grafana-oss
4345homestack_monitoring_grafana_image_version : 11.6.5
4446# homestack_monitoring_grafana_admin_password: "" # must be set
Original file line number Diff line number Diff line change 1111 mode : " 0750"
1212
1313- name : monitoring | Copy prometheus specific files to their respective directories
14- ansible.builtin.copy :
14+ ansible.builtin.template :
1515 src : " {{ item }}"
16- dest : " {{ homestack_monitoring_prometheus_base_path }}/{{ item | basename }}"
16+ dest : " {{ homestack_monitoring_prometheus_base_path }}/{{ item | basename | regex_replace(' \\ .j2$', '') }}"
1717 owner : " {{ homestack_uid }}"
1818 group : " {{ homestack_gid }}"
1919 mode : " 0600"
2020 backup : true
21- with_fileglob :
22- - monitoring/prometheus.yml
21+ with_items :
22+ - monitoring/prometheus.yml.j2
2323
2424- name : monitoring | Ensure grafana directories exist
2525 ansible.builtin.file :
Original file line number Diff line number Diff line change @@ -32,17 +32,17 @@ scrape_configs:
3232 scrape_interval: 5s
3333 scheme: https
3434 basic_auth:
35- username : ' prometheus '
36- password : ' CO&g0HH$ic*CM@8Gta&A '
35+ username: "{{ homestack_monitoring_prometheus_basic_auth_user }}"
36+ password: "{{ homestack_monitoring_prometheus_basic_auth_password }}"
3737 static_configs:
3838 - targets: ['micxer.de:9100']
3939
4040 - job_name: 'omicrontheta-exim4'
4141 scrape_interval: 5s
4242 scheme: https
4343 basic_auth:
44- username : ' prometheus '
45- password : ' CO&g0HH$ic*CM@8Gta&A '
44+ username: "{{ homestack_monitoring_prometheus_basic_auth_user }}"
45+ password: "{{ homestack_monitoring_prometheus_basic_auth_password }}"
4646 static_configs:
4747 - targets: ['micxer.de:9636']
4848
@@ -57,8 +57,8 @@ scrape_configs:
5757 # scrape_interval: 5s
5858 # scheme: http
5959 # basic_auth:
60- # username: 'prometheus'
61- # password: 'CO&g0HH$ic*CM@8Gta&A'
60+ # username: "{{ homestack_monitoring_prometheus_basic_auth_user }}"
61+ # password: "{{ homestack_monitoring_prometheus_basic_auth_password }}"
6262 # static_configs:
6363 # - targets:
6464 # - 'krikkit:9100'
You can’t perform that action at this time.
0 commit comments