mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-10-22 19:36:59 +02:00
Compare commits
7 commits
55405d5261
...
28ba191c8d
Author | SHA1 | Date | |
---|---|---|---|
|
28ba191c8d | ||
|
b171046f4c | ||
|
cc4692b37d | ||
|
5086fe389f | ||
|
c7d0bece62 | ||
|
ee169d0b73 | ||
|
ad6a46af11 |
4 changed files with 24 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
|
||||
- hosts: localhost
|
||||
- hosts: cas
|
||||
roles:
|
||||
- s3lph.pki.pki_ca
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
|||
strategy: free
|
||||
roles:
|
||||
- s3lph.pki.pki_entity
|
||||
- s3lph.prometheus.prometheus_node
|
||||
|
||||
- hosts: all_nodes
|
||||
strategy: free
|
||||
|
@ -26,4 +27,5 @@
|
|||
|
||||
- hosts: prometheus
|
||||
roles:
|
||||
- s3lph.pki.pki_entity
|
||||
- s3lph.prometheus.prometheus
|
||||
|
|
|
@ -31,6 +31,14 @@
|
|||
password: {{ job.basic_auth_password }}
|
||||
{% endif -%}
|
||||
|
||||
{% if 'tls_config' in job -%}
|
||||
tls_config:
|
||||
ca_file: {{ job.tls_config.ca_file }}
|
||||
cert_file: {{ job.tls_config.cert_file }}
|
||||
key_file: {{ job.tls_config.key_file }}
|
||||
insecure_skip_verify: {{ job.tls_config.insecure_skip_verify | default(false) }}
|
||||
{% endif -%}
|
||||
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for host in groups['all'] -%}
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
---
|
||||
|
||||
- name: render /etc/prometheus/tls/config.yml
|
||||
- name: create /etc/prometheus/node-exporter/tls
|
||||
file:
|
||||
path: /etc/prometheus/node-exporter/tls
|
||||
state: directory
|
||||
owner: prometheus
|
||||
group: prometheus
|
||||
|
||||
- name: render /etc/prometheus/node-exporter/tls/config.yml
|
||||
template:
|
||||
src: prometheus-node-exporter-webconfig.yml.j2
|
||||
dest: /etc/prometheus/tls/config.yml
|
||||
dest: /etc/prometheus/node-exporter/tls/config.yml
|
||||
owner: prometheus
|
||||
group: prometheus
|
||||
notify: restart prometheus-node-exporter
|
||||
|
||||
- name: render /etc/default/prometheus-node-exporter
|
||||
template:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
ARGS="{% for k, v in args.items() %}--{{ k }}=\"{{ v }}\" {% endfor %} --web.config=/etc/prometheus/tls/config.yml"
|
||||
ARGS="{% for k, v in args.items() %}--{{ k }}=\"{{ v }}\" {% endfor %} --web.config=/etc/prometheus/node-exporter/tls/config.yml"
|
||||
|
|
Loading…
Reference in a new issue