Skip to content

Commit

Permalink
Get the actual variable instead of the group name
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Sep 2, 2024
1 parent d3d81fa commit 19ddfa3
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 19ddfa3

Please sign in to comment.