diff --git a/plays/commonlib/vars.yml b/plays/commonlib/vars.yml index 8fb26b3..8f92cd6 100644 --- a/plays/commonlib/vars.yml +++ b/plays/commonlib/vars.yml @@ -24,6 +24,7 @@ when: config_yml.stat.exists include_vars: file: "{{ app_config_root }}/config.yml" + register: config_include - name: Check if an application vault directory exists stat: @@ -44,11 +45,11 @@ set_fact: config: { - "vars": "{{ lookup('vars', 'hostvars.vars', default=[]) }}", - "db": "{{ lookup('vars', 'hostvars.db', default=[]) }}", - "env": "{{ lookup('vars', 'hostvars.env', default=[]) }}", - "volumes": "{{ lookup('vars', 'hostvars.volumes', default=[]) }}", - "templates": "{{ lookup('vars', 'hostvars.templates', default=[]) }}", + "vars": "{{ config_include.ansible_facts.vars | default([]) }}", + "db": "{{ config_include.ansible_facts.db | default([]) }}", + "env": "{{ config_include.ansible_facts.env | default([]) }}", + "volumes": "{{ config_include.ansible_facts.volumes | default([]) }}", + "templates": "{{ config_include.ansible_facts.templates | default([]) }}", "vault": "{{ vault_include.ansible_facts }}", } dokku: