1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-11-22 09:41:01 +01:00

Add support for tls_config in prometheus scrape configs

This commit is contained in:
s3lph 2020-11-17 23:56:43 +01:00
parent 5086fe389f
commit cc4692b37d
2 changed files with 9 additions and 0 deletions

View file

@ -8,6 +8,7 @@
strategy: free
roles:
- s3lph.pki.pki_entity
- s3lph.prometheus.prometheus_node
- hosts: all_nodes
strategy: free

View file

@ -31,6 +31,14 @@
password: {{ job.basic_auth_password }}
{% endif -%}
{% if 'tls_config' in job %}
tls_config:
ca_file: {{ tls_config.ca_file }}
cert_file: {{ tls_config.cert_file }}
key_file: {{ tls_config.key_file }}
insecure_skip_verify: {{ tls_config.key_file | default(false) }}
{% endif -%}
static_configs:
- targets:
{% for host in groups['all'] -%}