hcp-ansible/playbooks/tasks/load_vars.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

---
# hashistack variable injection playbook
- name: "Load global variables"
ansible.builtin.import_tasks:
file: misc/load_global_vars.yml
- name: "Load credentials variables"
ansible.builtin.import_tasks:
file: misc/load_credentials_vars.yml
- name: "Load group specific variables"
ansible.builtin.import_tasks:
file: misc/load_group_vars.yml
- name: "Load host specific variables"
ansible.builtin.import_tasks:
file: misc/load_host_vars.yml
- name: "Ensure remote directories exists"
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: 0755
recurse: yes
loop:
- "{{ hashistack_remote_config_dir }}"
- "{{ hashistack_remote_data_dir }}"
- name: "Load custom CA certificates"
ansible.builtin.import_tasks:
file: misc/load_ca_certificates.yml
- name: "Merge consul configurations"
ansible.builtin.import_tasks:
file: "consul/consul_vars.yml"
when:
- enable_consul | bool
- "('consul_servers' in group_names) or ('consul_agents' in group_names)"
- name: "Merge vault configurations"
ansible.builtin.import_tasks:
file: "vault/vault_vars.yml"
when:
- enable_vault | bool
- "'vault_servers' in group_names"