Stagger creation of dictionaries

This commit is contained in:
Luke Murphy 2020-04-14 14:18:37 +02:00
parent 8bfff645e8
commit ff3ecb1855
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -41,7 +41,21 @@
- yml - yml
register: vault_include 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: set_fact:
config: config:
{ {
@ -50,14 +64,6 @@
"env": "{{ config_include.ansible_facts.env | default([]) }}", "env": "{{ config_include.ansible_facts.env | default([]) }}",
"volumes": "{{ config_include.ansible_facts.volumes | default([]) }}", "volumes": "{{ config_include.ansible_facts.volumes | default([]) }}",
"templates": "{{ config_include.ansible_facts.templates | 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 - name: Debug variable dictionaries