38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
|
---
|
||
|
# task/prerequisites file for renew_nomad_certificates
|
||
|
- name: "Install required roles"
|
||
|
ansible.builtin.command:
|
||
|
cmd: "ansible-galaxy install {{ item }}"
|
||
|
loop: "{{ renew_nomad_certificates_prerequisites_roles }}"
|
||
|
changed_when: false
|
||
|
delegate_to: localhost
|
||
|
run_once: true
|
||
|
|
||
|
- name: "Create directory {{ renew_nomad_certificates_config_dir }}"
|
||
|
ansible.builtin.file:
|
||
|
path: "{{ renew_nomad_certificates_config_dir }}"
|
||
|
state: directory
|
||
|
owner: "{{ renew_nomad_certificates_nomad_user }}"
|
||
|
group: "{{ renew_nomad_certificates_nomad_group }}"
|
||
|
mode: '0755'
|
||
|
|
||
|
- name: "Create directory templates directory in {{ renew_nomad_certificates_config_dir }}"
|
||
|
ansible.builtin.file:
|
||
|
path: "{{ renew_nomad_certificates_config_dir }}/templates"
|
||
|
state: directory
|
||
|
owner: "{{ renew_nomad_certificates_nomad_user }}"
|
||
|
group: "{{ renew_nomad_certificates_nomad_group }}"
|
||
|
mode: '0755'
|
||
|
|
||
|
- name: "Ensure certificate/key directory(ies) exist(s)"
|
||
|
ansible.builtin.file:
|
||
|
path: "{{item | dirname }}"
|
||
|
state: directory
|
||
|
owner: "{{ renew_nomad_certificates_nomad_user }}"
|
||
|
group: "{{ renew_nomad_certificates_nomad_group }}"
|
||
|
mode: '0755'
|
||
|
loop:
|
||
|
- "{{ renew_nomad_certificates_cert_dest }}"
|
||
|
- "{{ renew_nomad_certificates_key_dest }}"
|
||
|
- "{{ renew_nomad_certificates_ca_dest }}"
|