add configuration to use mSSL

This commit is contained in:
histausse 2021-09-21 15:50:15 +02:00
parent 586244a98f
commit 2a69cb23a6
Signed by: histausse
GPG key ID: 67486F107F62E9E9
2 changed files with 25 additions and 1 deletions

View file

@ -16,13 +16,30 @@
# and add --web.config=/etc/node_exporter/config.yaml to
# the args in /etc/default/prometheus-node-exporter
- name: Ensure /etc/node_exporter exist
file:
path: /etc/node_exporter
state: directory
group: prometheus
owner: prometheus
mode: u=rwx,g=rx,o=rx
- name: Copy the config folder
template:
src: config.yaml
dest: /etc/node_exporter/config.yaml
group: prometheus
owner: prometheus
mode: u=rw,g=r,o=r
notify: Restart prometheus-node-exporter
- name: Setup the arguments for node-exporter
template:
src: prometheus-node-exporter
dest: /etc/default/prometheus-node-exporter
owner: root
group: root
mode: '0644'
mode: u=rw,g=r,o=r
notify: Restart prometheus-node-exporter
vars:
args:

View file

@ -0,0 +1,7 @@
{{ ansible_managed | comment }}
tls_server_config:
cert_file: "/etc/node_exporter/{{ lan_address }}.crt"
key_file: "/etc/node_exporter/{{ lan_address }}.key"
client_auth_type: "RequireAndVerifyClientCert"
client_ca_file: "/etc/node_exporter/ca.crt"