xoxys.alertmanager/tasks/tls.yml

34 lines
964 B
YAML
Raw Permalink Normal View History

2021-06-02 22:01:24 +00:00
---
- block:
- name: Create tls folder structure
file:
path: "{{ item }}"
state: directory
owner: "{{ alertmanager_user }}"
group: "{{ alertmanager_group }}"
recurse: True
loop:
- "{{ alertmanager_web_tls_cert_path | dirname }}"
- "{{ alertmanager_web_tls_key_path | dirname }}"
become: True
become_user: root
- block:
- name: Copy certs and private key
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
loop:
- src: "{{ alertmanager_web_tls_key_source }}"
dest: "{{ alertmanager_web_tls_key_path }}"
mode: "0600"
- src: "{{ alertmanager_web_tls_cert_source }}"
dest: "{{ alertmanager_web_tls_cert_path }}"
mode: "0750"
loop_control:
label: "{{ item.dest }}"
2021-06-05 20:54:19 +00:00
notify: __alertmanager_reload
2021-06-02 22:01:24 +00:00
become: True
become_user: "{{ alertmanager_user }}"