From ff3ecb1855384302029abb845e84324a558426f7 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 14 Apr 2020 14:18:37 +0200 Subject: [PATCH] Stagger creation of dictionaries --- plays/commonlib/vars.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/plays/commonlib/vars.yml b/plays/commonlib/vars.yml index 8f92cd6..46f5958 100644 --- a/plays/commonlib/vars.yml +++ b/plays/commonlib/vars.yml @@ -41,7 +41,21 @@ - yml register: vault_include -- name: Create the variable dictionaries +- name: Create the dokku variable dictionary + set_fact: + dokku: + { + app: "{{ app }}", + mariadb_addr: "dokku-mariadb-{{ app }}", + mariadb_user: "mariadb", + hostname: "{{ lookup('file', '/home/dokku/HOSTNAME') }}", + } + +- name: Create the vault variable dictionary + set_fact: + vault: "{{ vault_include.ansible_facts }}" + +- name: Create the config variable dictionary set_fact: config: { @@ -50,14 +64,6 @@ "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: - { - app: "{{ app }}", - mariadb_addr: "dokku-mariadb-{{ app }}", - mariadb_user: "mariadb", - hostname: "{{ lookup('file', '/home/dokku/HOSTNAME') }}", } - name: Debug variable dictionaries