diff --git a/plays/commonlib/vars.yml b/plays/commonlib/vars.yml index 2533df7..a37b79a 100644 --- a/plays/commonlib/vars.yml +++ b/plays/commonlib/vars.yml @@ -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: