summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/docker/tasks/main.yml6
1 files changed, 1 insertions, 5 deletions
diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml
index 7240a14c..9851d4dc 100644
--- a/ansible/roles/docker/tasks/main.yml
+++ b/ansible/roles/docker/tasks/main.yml
@@ -16,15 +16,11 @@
path: /etc/docker
state: directory
-- name: Resolve the ansible_host address to ip
- shell: LANG=C ping -n -c1 "{{ hostvars[groups.infrastructure[0]].ansible_host }}" | sed -n 1p | cut -d' ' -f3 | tr -d '()'
- register: infra_ipv4
-
- name: Setup docker dns settings
json_add:
path: /etc/docker/daemon.json
key: dns
- value: "{{ infra_ipv4.stdout }}"
+ value: "{{ hostvars[groups.infrastructure[0]].ansible_default_ipv4.address }}"
notify:
- Restart Docker