add configuration to use mSSL
This commit is contained in:
parent
586244a98f
commit
2a69cb23a6
2 changed files with 25 additions and 1 deletions
|
@ -16,13 +16,30 @@
|
||||||
# and add --web.config=/etc/node_exporter/config.yaml to
|
# and add --web.config=/etc/node_exporter/config.yaml to
|
||||||
# the args in /etc/default/prometheus-node-exporter
|
# 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
|
- name: Setup the arguments for node-exporter
|
||||||
template:
|
template:
|
||||||
src: prometheus-node-exporter
|
src: prometheus-node-exporter
|
||||||
dest: /etc/default/prometheus-node-exporter
|
dest: /etc/default/prometheus-node-exporter
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: u=rw,g=r,o=r
|
||||||
notify: Restart prometheus-node-exporter
|
notify: Restart prometheus-node-exporter
|
||||||
vars:
|
vars:
|
||||||
args:
|
args:
|
||||||
|
|
7
roles/prometheus-node-exporter/templates/config.yaml
Normal file
7
roles/prometheus-node-exporter/templates/config.yaml
Normal 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"
|
Loading…
Reference in a new issue