From d12a72b81f80012797f559d5d2c5a41cbe5345cb Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 3 Jul 2017 22:44:59 +0100 Subject: [PATCH] Work around bad DNS resolution OpenStack-Infra DNS resolution of images.linuxcontainers.org is failing very often. This works around it by adding the appropriate entries into /etc/hosts on the host. Change-Id: I55a06c1903c4435db6d820e6919daa5f10362031 --- tests/test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test.yml b/tests/test.yml index 1d034677..4669b650 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -37,6 +37,16 @@ register: key_get - set_fact: lxc_container_ssh_key: key_get.stdout + # This is a very dirty hack due to images.linuxcontainers.org + # constantly failing to resolve in openstack-infra. + - name: Implement hard-coded hosts entries for consistently failing name + lineinfile: + path: "/etc/hosts" + line: "{{ item }}" + state: present + with_items: + - "91.189.91.21 images.linuxcontainers.org us.images.linuxcontainers.org" + - "91.189.88.37 images.linuxcontainers.org uk.images.linuxcontainers.org" roles: - role: "lxc_hosts" lxc_net_address: 10.100.100.1