add mSSL auth for prometheus serveur
This commit is contained in:
parent
f487bb87e1
commit
894a7e23ee
2 changed files with 19 additions and 1 deletions
|
@ -58,6 +58,15 @@
|
||||||
notify: Restart prometheus
|
notify: Restart prometheus
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
|
- name: Copy the web-config folder
|
||||||
|
template:
|
||||||
|
src: web-config.yaml
|
||||||
|
dest: /etc/prometheus/web-config.yaml
|
||||||
|
group: prometheus
|
||||||
|
owner: prometheus
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
notify: Restart prometheus
|
||||||
|
|
||||||
- name: Setup the arguments for prometheus
|
- name: Setup the arguments for prometheus
|
||||||
template:
|
template:
|
||||||
src: prometheus
|
src: prometheus
|
||||||
|
@ -69,4 +78,6 @@
|
||||||
vars:
|
vars:
|
||||||
args:
|
args:
|
||||||
- name: web.listen-address
|
- name: web.listen-address
|
||||||
value: "{{ lan_address }}:9090"
|
value: "{{ lan_address }}:9090"
|
||||||
|
- name: web.config
|
||||||
|
value: /etc/prometheus/web-config.yaml
|
||||||
|
|
7
roles/prometheus/templates/web-config.yaml
Normal file
7
roles/prometheus/templates/web-config.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
tls_server_config:
|
||||||
|
cert_file: "/etc/prometheus/prometheus-{{ lan_address }}.crt"
|
||||||
|
key_file: "/etc/prometheus/prometheus-{{ lan_address }}.key"
|
||||||
|
client_auth_type: "RequireAndVerifyClientCert"
|
||||||
|
client_ca_file: "/etc/prometheus/ca.crt"
|
Loading…
Reference in a new issue