From c936d635de6e040e40c56c08b686e69ce703f439 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 14 Apr 2020 15:10:30 +0200 Subject: [PATCH] Use machine host --- plays/commonlib/vars.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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: