Spit out environment for now

This commit is contained in:
Luke Murphy
2020-04-13 14:04:38 +02:00
parent 39272350c3
commit b04afd85fb
8 changed files with 33 additions and 73 deletions

View File

@ -1,7 +0,0 @@
---
- name: Load app config into playbook context
include_vars:
dir: "{{ app_config_root }}"
extensions:
- yml
- yaml

View File

@ -1,5 +1,4 @@
---
- name: Setup preparatory facts
set_fact:
db_type: "{{ db['type'] }}"

View File

@ -4,21 +4,21 @@
msg: |
Module Variables ("vars"):
--------------------------------
{{ vars | to_nice_json }}
{{ vars }}
Environment Variables ("environment"):
--------------------------------
{{ environment | to_nice_json }}
{{ environment }}
GROUP NAMES Variables ("group_names"):
--------------------------------
{{ group_names | to_nice_json }}
{{ group_names }}
GROUPS Variables ("groups"):
--------------------------------
{{ groups | to_nice_json }}
{{ groups }}
HOST Variables ("hostvars"):
--------------------------------
{{ hostvars | to_nice_json }}
{{ hostvars }}
when: debug

View File

@ -1,9 +1,11 @@
---
- name: Check if internal variables are available for loading
stat:
path: "{{ app_config_root }}/vars.yml"
register: internal_vars
- name: Load internal variables
include_vars: "{{ app_config_root }}/vars.yml"
when: internal_vars.stat.exists
- name: Load all deployment variables
include_vars:
dir: "{{ item }}"
extensions:
- yml
- yaml
with_items:
- "{{ plugin_config_root }}"
- "{{ app_config_root }}"
- "{{ app_config_root }}/vault"

View File

@ -1,13 +0,0 @@
---
- name: Check if vault variables are available for loading
stat:
path: "{{ app_config_root }}/vault/"
register: vault_dir
- name: Load vault variables into playbook context
include_vars:
dir: "{{ app_config_root }}/vault/"
extensions:
- yml
- yaml
when: vault_dir.stat.exists