diff --git a/playbooks/monitoring.yml b/playbooks/monitoring.yml index c245ccc..af6be80 100644 --- a/playbooks/monitoring.yml +++ b/playbooks/monitoring.yml @@ -8,6 +8,7 @@ strategy: free roles: - s3lph.pki.pki_entity + - s3lph.prometheus.prometheus_node - hosts: all_nodes strategy: free diff --git a/roles/prometheus/templates/prometheus-job.yml b/roles/prometheus/templates/prometheus-job.yml index 89f3c92..946815d 100644 --- a/roles/prometheus/templates/prometheus-job.yml +++ b/roles/prometheus/templates/prometheus-job.yml @@ -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'] -%}