Robert Kaussow
ffe27507d0
All checks were successful
continuous-integration/drone/push Build is passing
33 lines
928 B
YAML
33 lines
928 B
YAML
---
|
|
- 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 }}"
|
|
become: True
|
|
become_user: "{{ alertmanager_user }}"
|