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
|
||||
# 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:
|
||||
|
|
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