diff --git a/provision-contest/ansible/roles/grafana/templates/prometheus.yml.j2 b/provision-contest/ansible/roles/grafana/templates/prometheus.yml.j2 index 91d8791e..2fcb83e3 100644 --- a/provision-contest/ansible/roles/grafana/templates/prometheus.yml.j2 +++ b/provision-contest/ansible/roles/grafana/templates/prometheus.yml.j2 @@ -14,7 +14,7 @@ scrape_configs: - job_name: node_judgehost basic_auth: username: "prometheus" - password: "{{ groups[group_prefix+"judgehost"][0]['PROMETHEUS_PASS'] }}" + password: "{{ hostvars[groups[group_prefix+"judgehost"][0]]['PROMETHEUS_PASS'] }}" tls_config: insecure_skip_verify: true scheme: https @@ -41,7 +41,7 @@ scrape_configs: - job_name: {{ group_prefix ~ 'db' }} basic_auth: username: "prometheus" - password: "{{ groups[group_prefix+"domserver"][0]['PROMETHEUS_PASS'] }}" + password: "{{ hostvars[groups[group_prefix+"domserver"][0]]['PROMETHEUS_PASS'] }}" tls_config: insecure_skip_verify: true scheme: https @@ -53,7 +53,7 @@ scrape_configs: - job_name: {{ group_prefix ~ 'node_domserver' }} basic_auth: username: "prometheus" - password: "{{ groups[group_prefix+"domserver"][0]['PROMETHEUS_PASS'] }}" + password: "{{ hostvars[groups[group_prefix+"domserver"][0]]['PROMETHEUS_PASS'] }}" tls_config: insecure_skip_verify: true scheme: https @@ -65,7 +65,7 @@ scrape_configs: - job_name: {{ group_prefix ~ 'web_nginx_domserver' }} basic_auth: username: "prometheus" - password: "{{ groups[group_prefix+"domserver"][0]['PROMETHEUS_PASS'] }}" + password: "{{ hostvars[groups[group_prefix+"domserver"][0]]['PROMETHEUS_PASS'] }}" tls_config: insecure_skip_verify: true scheme: https @@ -77,7 +77,7 @@ scrape_configs: - job_name: {{ group_prefix ~ 'web_fpm_domserver' }} basic_auth: username: "prometheus" - password: "{{ groups[group_prefix+"domserver"][0]['PROMETHEUS_PASS'] }}" + password: "{{ hostvars[groups[group_prefix+"domserver"][0]]['PROMETHEUS_PASS'] }}" tls_config: insecure_skip_verify: true scheme: https