1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-12-23 00:37:33 +01:00

Add bearer auth to scrape config template

This commit is contained in:
s3lph 2022-12-08 01:03:34 +01:00
parent 01442d4250
commit ca2cc8da62
2 changed files with 11 additions and 1 deletions

View file

@ -7,7 +7,7 @@ namespace: s3lph
name: prometheus
# The version of the collection. Must be compatible with semantic versioning
version: 0.9.0
version: 0.9.1
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

View file

@ -58,6 +58,16 @@ scrape_configs:
password: {{ job.basic_auth_password }}
{% endif %}
{% if 'authorization' in job %}
authorization:
{% if 'type' in job.authorization %}
type: {{ job.authorization.type }}
{% endif %}
{% if 'credentials' in job.authorization %}
credentials: {{ job.authorization.credentials }}
{% endif %}
{% endif %}
{% if 'tls_config' in job %}
tls_config:
ca_file: {{ job.tls_config.ca_file }}