Robert Kaussow
fd59ad7165
All checks were successful
continuous-integration/drone/push Build is passing
33 lines
910 B
YAML
33 lines
910 B
YAML
---
|
|
- block:
|
|
- name: Create tls folder structure
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "{{ prometheus_user }}"
|
|
group: "{{ prometheus_group }}"
|
|
recurse: True
|
|
loop:
|
|
- "{{ prometheus_web_tls_cert_path | dirname }}"
|
|
- "{{ prometheus_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: "{{ prometheus_web_tls_key_source }}"
|
|
dest: "{{ prometheus_web_tls_key_path }}"
|
|
mode: "0600"
|
|
- src: "{{ prometheus_web_tls_cert_source }}"
|
|
dest: "{{ prometheus_web_tls_cert_path }}"
|
|
mode: "0750"
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
become: True
|
|
become_user: "{{ prometheus_user }}"
|