2024-05-03 20:22:59 +00:00
|
|
|
---
|
2024-07-14 14:19:43 +00:00
|
|
|
- name: "Include all default variables"
|
|
|
|
ansible.builtin.include_vars:
|
|
|
|
dir: "../../group_vars/all"
|
|
|
|
depth: 1
|
|
|
|
extensions: ["yml"]
|
|
|
|
delegate_to: localhost
|
|
|
|
|
2024-05-03 20:22:59 +00:00
|
|
|
- name: "Stat global configuration file"
|
|
|
|
ansible.builtin.stat:
|
|
|
|
path: "{{ configuration_directory }}/{{ configuration_global_vars_file }}"
|
|
|
|
register: _global_config_file
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
- name: "Make sure global configuration file exists"
|
|
|
|
ansible.builtin.assert:
|
|
|
|
that:
|
|
|
|
- _global_config_file.stat.exists
|
|
|
|
fail_msg: >-
|
|
|
|
Main configuration file {{ _global_config_file.stat.path }} was not found, cannot continue without it.
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
- name: "Load global variables"
|
|
|
|
ansible.builtin.include_vars:
|
|
|
|
dir: "{{ configuration_directory }}"
|
|
|
|
files_matching: "{{ configuration_global_vars_file }}"
|
|
|
|
depth: 1
|
|
|
|
delegate_to: localhost
|