blob: 40b518033a75bdb882a691af68a5a0954a57a84a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
---
- name: Load global variables
include_vars: "{{kaas_project_path}}/vars/globals.yml"
when: "'{{kaas_project_path}}/vars/globals.yml' | is_file"
- name: Load variables
include_vars: dir="{{kaas_project_path}}/vars" name="var_{{kaas_project}}_config"
when: "'{{kaas_project_path}}/vars' | is_dir"
- set_fact: "var_{{kaas_project}}_config={{var_empty}}"
vars:
var_empty:
pods: {}
var_name: "var_{{kaas_project}}_config"
when: hostvars[inventory_hostname][var_name] is not defined
#- debug: msg="{{kaas_project_path}}"
#- debug:
# msg="{{kaas_project_config}}"
# vars:
# var_name: "var_{{kaas_project}}_config"
# kaas_project_config: "{{hostvars[inventory_hostname][var_name]}}"
- include_tasks: do_project.yml
vars:
var_name: "var_{{kaas_project}}_config"
kaas_project_config: "{{hostvars[inventory_hostname][var_name]}}"
|