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
This commit is contained in:
Markos Chandras 2017-07-03 22:44:59 +01:00
parent 9ad5dbbf92
commit d12a72b81f

View File

@ -37,6 +37,16 @@
register: key_get register: key_get
- set_fact: - set_fact:
lxc_container_ssh_key: key_get.stdout 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: roles:
- role: "lxc_hosts" - role: "lxc_hosts"
lxc_net_address: 10.100.100.1 lxc_net_address: 10.100.100.1