hcp-ansible/roles/hashistack_ca/tasks/main.yml
Bertrand Lanson 03f58b49ac
feat: enable certificate renewal for nomad and vault in hashistack_ca
Until now this role was not able to renew nomad and vault leaf certificates,
tho the code to do so was present. It can now do it.
2024-11-10 15:43:44 +01:00

60 lines
2.1 KiB
YAML

---
# task/main file for hashistack_ca
- name: "CA | Import generate_root.yml"
ansible.builtin.include_tasks: generate/generate_root.yml
when: hashistack_ca_generate_root
- name: "CA | Import generate_intermediate.yml"
ansible.builtin.include_tasks: generate/generate_intermediate.yml
when: hashistack_ca_generate_intermediate
- name: "CA | Import renew_root.yml"
ansible.builtin.include_tasks: renew/renew_root.yml
when: hashistack_ca_renew_root
- name: "CA | Import renew_intermediate.yml"
ansible.builtin.include_tasks: renew/renew_intermediate.yml
when: hashistack_ca_renew_intermediate
- name: "CA | Import prepare_ca_to_copy.yml"
ansible.builtin.include_tasks: prepare_ca_to_copy.yml
- name: "CA | Import cleanup_backups.yml"
ansible.builtin.include_tasks: cleanup_backups.yml
- name: "Consul leaf certificates | Import generate/generate_consul.yml"
ansible.builtin.include_tasks: generate/generate_consul.yml
when:
- hashistack_ca_generate_leaf
- "('consul_servers' in group_names) or ('consul_agents' in group_names)"
- name: "Nomad leaf certificates | Import generate/generate_nomad.yml"
ansible.builtin.include_tasks: generate/generate_nomad.yml
when:
- hashistack_ca_generate_leaf
- "('nomad_servers' in group_names) or ('nomad_clients' in group_names)"
- name: "Vault leaf certificates | Import generate/generate_vault.yml"
ansible.builtin.include_tasks: generate/generate_vault.yml
when:
- hashistack_ca_generate_leaf
- "'vault_servers' in group_names"
- name: "Consul leaf certificates | Import renew_consul.yml"
ansible.builtin.include_tasks: renew/renew_consul.yml
when:
- hashistack_ca_renew_leaf
- "('consul_servers' in group_names) or ('consul_agents' in group_names)"
- name: "Nomad leaf certificates | Import renew_nomad.yml"
ansible.builtin.include_tasks: renew/renew_nomad.yml
when:
- hashistack_ca_renew_leaf
- "('nomad_servers' in group_names) or ('nomad_clients' in group_names)"
- name: "Vault leaf certificates | Import renew_vault.yml"
ansible.builtin.include_tasks: renew/renew_vault.yml
when:
- hashistack_ca_renew_leaf
- "'vault_servers' in group_names"