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: I3fc1ad39d112d07bf4b1bc85d9c0f44ef91cfba5
This commit is contained in:
Jesse Pretorius 2017-06-22 17:36:42 +01:00 committed by Jesse Pretorius (odyssey4me)
parent bdb6711903
commit b55fc7240d

View File

@ -91,6 +91,19 @@
path: /etc/pip.conf
register: pip_conf_file
# 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"
when:
- nodepool_dir.stat.exists
- name: Determine the fastest available OpenStack-Infra wheel mirror
command: "{{ bootstrap_host_aio_script_path }}/fastest-infra-wheel-mirror.py"
register: fastest_wheel_mirror