Bertrand Lanson
ff66fe22ae
All checks were successful
development / Check commit compliance (push) Successful in 27s
20 lines
728 B
YAML
20 lines
728 B
YAML
---
|
|
- name: "Variables | Stat host specific config file"
|
|
ansible.builtin.stat:
|
|
path: "{{ hashistack_configuration_directory }}/{{ group_name }}/{{ inventory_hostname }}/{{ hashistack_configuration_global_vars_file }}"
|
|
register: _host_config_file
|
|
loop: "{{ group_names }}"
|
|
loop_control:
|
|
loop_var: group_name
|
|
delegate_to: localhost
|
|
|
|
- name: "Variables | Load host specific variables"
|
|
ansible.builtin.include_vars:
|
|
dir: "{{ hashistack_configuration_directory }}/{{ item.group_name }}/{{ inventory_hostname }}"
|
|
files_matching: "{{ hashistack_configuration_global_vars_file }}"
|
|
loop: "{{ _host_config_file.results }}"
|
|
when: item.stat.exists
|
|
loop_control:
|
|
loop_var: item
|
|
delegate_to: localhost
|