xoxys.telegraf/tasks/tls.yml
Robert Kaussow cb5e5aa8a1
All checks were successful
continuous-integration/drone/push Build is passing
feat: add reload handler
2021-06-05 17:21:20 +02:00

31 lines
874 B
YAML

---
- block:
- name: Create tls folder structure
file:
path: "{{ item }}"
state: directory
recurse: True
loop:
- "{{ telegraf_prometheus_tls_cert_path | dirname }}"
- "{{ telegraf_prometheus_tls_key_path | dirname }}"
- name: Copy certs and private key
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: telegraf
group: root
mode: "{{ item.mode }}"
loop:
- src: "{{ telegraf_prometheus_tls_key_source }}"
dest: "{{ telegraf_prometheus_tls_key_path }}"
mode: "0600"
- src: "{{ telegraf_prometheus_tls_cert_source }}"
dest: "{{ telegraf_prometheus_tls_cert_path }}"
mode: "0750"
loop_control:
label: "{{ item.dest }}"
notify: __telegraf_reload
become: True
become_user: root