2023-12-30 14:54:37 +00:00
|
|
|
---
|
|
|
|
# hashistack variable injection playbook
|
|
|
|
- name: "Deploy"
|
|
|
|
hosts: all
|
|
|
|
gather_facts: true
|
|
|
|
become: true
|
|
|
|
tasks:
|
|
|
|
- name: "Load global variables"
|
2024-01-02 20:11:32 +00:00
|
|
|
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 }}"
|
|
|
|
files_matching: "{{ configuration_global_vars_file }}"
|
2023-12-30 14:54:37 +00:00
|
|
|
|
|
|
|
- name: "Load group specific variables"
|
|
|
|
ansible.builtin.include_vars:
|
|
|
|
dir: ""
|
|
|
|
files_matching: ""
|
|
|
|
|
|
|
|
- name: "Load host specific variables"
|
|
|
|
ansible.builtin.include_vars:
|
|
|
|
dir: ""
|
|
|
|
files_matching: ""
|