From 55dd7f5c28a0d3e68a3825d25d757a63e8622155 Mon Sep 17 00:00:00 2001 From: Michal Zegan Date: Fri, 4 Jan 2019 14:20:03 +0100 Subject: Fix docker config handling in offline installer This fixes adding of dns address to /etc/docker/daemon.json to always use infra's ip address instead of possibly using it's hostname. It is done by replacing usage of "ansible_host" by "ansible_default_ipv4.address" fact. Change-Id: If6a29f3bf11ece7f883b099a1ab503341859cb90 Issue-ID: OOM-1573 Signed-off-by: Michal Zegan --- ansible/roles/docker/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ansible/roles/docker') diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml index 28c322c3..9851d4dc 100644 --- a/ansible/roles/docker/tasks/main.yml +++ b/ansible/roles/docker/tasks/main.yml @@ -20,7 +20,7 @@ json_add: path: /etc/docker/daemon.json key: dns - value: "{{ hostvars[groups.infrastructure[0]].ansible_host }}" + value: "{{ hostvars[groups.infrastructure[0]].ansible_default_ipv4.address }}" notify: - Restart Docker -- cgit 1.2.3-korg