2023-04-28 21:49:24 +00:00
|
|
|
---
|
2023-04-29 19:46:58 +00:00
|
|
|
# task/prerequisites file for renew_consul_certificates
|
|
|
|
- name: "Create directory {{ renew_consul_certificates_config_dir }}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ renew_consul_certificates_config_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ renew_consul_certificates_consul_user }}"
|
|
|
|
group: "{{ renew_consul_certificates_consul_group }}"
|
|
|
|
mode: '0755'
|
2023-12-02 09:09:56 +00:00
|
|
|
become: true
|
2023-04-29 19:46:58 +00:00
|
|
|
|
|
|
|
- name: "Create directory templates directory in {{ renew_consul_certificates_config_dir }}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ renew_consul_certificates_config_dir }}/templates"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ renew_consul_certificates_consul_user }}"
|
|
|
|
group: "{{ renew_consul_certificates_consul_group }}"
|
|
|
|
mode: '0755'
|
2023-12-02 09:09:56 +00:00
|
|
|
become: true
|
2023-04-29 19:46:58 +00:00
|
|
|
|
|
|
|
- name: "Ensure certificate/key directory(ies) exist(s)"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{item | dirname }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ renew_consul_certificates_consul_user }}"
|
|
|
|
group: "{{ renew_consul_certificates_consul_group }}"
|
|
|
|
mode: '0755'
|
2023-12-02 09:09:56 +00:00
|
|
|
become: true
|
2023-04-29 19:46:58 +00:00
|
|
|
loop:
|
|
|
|
- "{{ renew_consul_certificates_cert_dest }}"
|
|
|
|
- "{{ renew_consul_certificates_key_dest }}"
|
|
|
|
- "{{ renew_consul_certificates_ca_dest }}"
|