mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-22 17:51:01 +01:00
Add bearer auth to scrape config template
This commit is contained in:
parent
01442d4250
commit
ca2cc8da62
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue