Use machine host

This commit is contained in:
Luke Murphy 2020-04-14 15:10:30 +02:00
parent f8e0e01afd
commit c936d635de
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -49,6 +49,7 @@
mariadb_addr: "dokku-mariadb-{{ app }}",
mariadb_user: "mariadb",
hostname: "{{ lookup('file', '/home/dokku/HOSTNAME') }}",
host: "{{ inventory_hostname }}",
}
- name: Debug variable dictionaries
@ -64,11 +65,11 @@
- name: Create config variable dictionary
set_fact:
config:
db: "{{ hostvars[dokku.hostname].db | default([]) }}"
env: "{{ hostvars[dokku.hostname].env | default([]) }}"
templates: "{{ hostvars[dokku.hostname].templates | default([]) }}"
vars: "{{ hostvars[dokku.hostname].vars | default([]) }}"
volumes: "{{ hostvars[dokku.hostname].volumes | default([]) }}"
db: "{{ hostvars[dokku.host].db | default([]) }}"
env: "{{ hostvars[dokku.host].env | default([]) }}"
templates: "{{ hostvars[dokku.host].templates | default([]) }}"
vars: "{{ hostvars[dokku.host].vars | default([]) }}"
volumes: "{{ hostvars[dokku.host].volumes | default([]) }}"
- name: Create vault variable dictionary
set_fact: