2023-04-16 20:26:14 +00:00
|
|
|
---
|
|
|
|
# task/prerequisites file for renew_vault_certificates
|
2023-04-16 22:31:28 +00:00
|
|
|
- name: "Create directory {{ renew_vault_certificates_config_dir }}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ renew_vault_certificates_config_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ renew_vault_certificates_vault_user }}"
|
|
|
|
group: "{{ renew_vault_certificates_vault_group }}"
|
|
|
|
mode: '0755'
|
2023-12-02 15:06:10 +00:00
|
|
|
become: true
|
2023-04-17 21:20:12 +00:00
|
|
|
|
2023-04-18 20:56:15 +00:00
|
|
|
- name: "Create directory templates directory in {{ renew_vault_certificates_config_dir }}"
|
2023-04-17 21:20:12 +00:00
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ renew_vault_certificates_config_dir }}/templates"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ renew_vault_certificates_vault_user }}"
|
|
|
|
group: "{{ renew_vault_certificates_vault_group }}"
|
|
|
|
mode: '0755'
|
2023-12-02 15:06:10 +00:00
|
|
|
become: true
|
2023-04-29 17:04:57 +00:00
|
|
|
|
|
|
|
- name: "Ensure certificate/key directory(ies) exist(s)"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{item | dirname }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ renew_vault_certificates_vault_user }}"
|
|
|
|
group: "{{ renew_vault_certificates_vault_group }}"
|
|
|
|
mode: '0755'
|
2023-12-02 15:06:10 +00:00
|
|
|
become: true
|
2023-04-29 17:04:57 +00:00
|
|
|
loop:
|
|
|
|
- "{{ renew_vault_certificates_cert_dest }}"
|
|
|
|
- "{{ renew_vault_certificates_key_dest }}"
|