feat(vars): add check to load global vars file before running deployment
This commit is contained in:
parent
27df88ae09
commit
34bb4bd7ad
@ -8,6 +8,7 @@
|
||||
- name: "debug"
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ hashi_vault_configuration.listener }}"
|
||||
|
||||
- name: "Vault"
|
||||
when: enable_vault | bool
|
||||
when: "'vault_servers' in group_names"
|
||||
|
@ -5,6 +5,18 @@
|
||||
gather_facts: true
|
||||
become: true
|
||||
tasks:
|
||||
- name: "Load global variables"
|
||||
block:
|
||||
- name: "Stat global configuration file"
|
||||
ansible.builtin.stat:
|
||||
path: "{{ configuration_directory }}/{{ configuration_global_vars_file }}"
|
||||
register: _global_config_file
|
||||
|
||||
- name: "Make sure global configuration file exists"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- _global_config_file.stat.exists
|
||||
|
||||
- name: "Load global variables"
|
||||
ansible.builtin.include_vars:
|
||||
dir: "{{ configuration_directory }}"
|
||||
|
Loading…
Reference in New Issue
Block a user