aboutsummaryrefslogtreecommitdiff
path: root/tasks/tls.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/tls.yml')
-rw-r--r--tasks/tls.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/tasks/tls.yml b/tasks/tls.yml
new file mode 100644
index 0000000..42bb0fe
--- /dev/null
+++ b/tasks/tls.yml
@@ -0,0 +1,17 @@
+---
+- name: Copy CA certificate
+ copy:
+ content: '{{node_exporter_tls_ca}}'
+ dest: '{{node_exporter_home_dir}}/conf/ca.crt'
+ notify: Restart node_exporter
+- name: Copy TLS Key
+ copy:
+ content: '{{node_exporter_tls_key}}'
+ dest: '{{node_exporter_home_dir}}/conf/key'
+ mode: '0600'
+ notify: Restart node_exporter
+- name: Copy TLS cert
+ copy:
+ content: '{{node_exporter_tls_crt}}'
+ dest: '{{node_exporter_home_dir}}/conf/crt'
+ notify: Restart node_exporter