From 46de08da3bb0cb5a95a757a013edb096be5ca56f Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 7 Jun 2016 13:29:45 +0100 Subject: [PATCH] Make the LXC container create use the host resolver config The current container creation process overrides the DNS resolution configuration instead of consuming the configuration implemented in the container cache preparation. With the implementation of change I66b448dee361e231d172eb278b290ec4dccfdf97 The container cache makes use of the host resolver configuration. This patch ensures that the container create process falls into line with that instead of overriding the cache configuration. Change-Id: I0f12a50471e670a03e17bfaa2c150a8da3f63af4 --- defaults/main.yml | 4 ---- vars/redhat-7.yml | 4 ---- vars/ubuntu-14.04.yml | 6 ------ vars/ubuntu-16.04.yml | 6 ------ 4 files changed, 20 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index f8c4324..3d32254 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -55,7 +55,3 @@ lxc_container_download_template_options: > --force-cache --server {{ lxc_image_cache_server }} --variant={{ lxc_container_variant }} - -lxc_cache_resolvers: - - 'nameserver 8.8.8.8' - - 'nameserver 8.8.4.4' diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index dffaf1a..dde89f1 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -45,10 +45,6 @@ lxc_container_map: release: 7 prep_commands: | mkdir -p /var/backup - rm /etc/resolv.conf - {% for resolver in lxc_cache_resolvers %} - echo "{{ resolver }}" | tee -a /etc/resolv.conf - {% endfor %} if [ -f "/usr/lib/systemd/system/poweroff.target" ];then ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target || true fi diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml index 0b9dc05..2c2f52e 100644 --- a/vars/ubuntu-14.04.yml +++ b/vars/ubuntu-14.04.yml @@ -53,12 +53,6 @@ lxc_container_map: release: trusty prep_commands: | mkdir -p /var/backup - echo '# Null Tail' | tee /etc/resolvconf/resolv.conf.d/tail - echo '# Null original' | tee /etc/resolvconf/resolv.conf.d/original - rm /etc/resolvconf/resolv.conf.d/base - {% for resolver in lxc_cache_resolvers %} - echo 'nameserver {{ resolver }}' | tee -a /etc/resolvconf/resolv.conf.d/base - {% endfor %} if [ -f "/usr/lib/systemd/system/poweroff.target" ];then ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target || true fi diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 8a7baae..b94388c 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -53,12 +53,6 @@ lxc_container_map: release: xenial prep_commands: | mkdir -p /var/backup - echo '# Null Tail' | tee /etc/resolvconf/resolv.conf.d/tail - echo '# Null original' | tee /etc/resolvconf/resolv.conf.d/original - rm /etc/resolvconf/resolv.conf.d/base - {% for resolver in lxc_cache_resolvers %} - echo 'nameserver {{ resolver }}' | tee -a /etc/resolvconf/resolv.conf.d/base - {% endfor %} if [ -f "/usr/lib/systemd/system/poweroff.target" ];then ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target || true fi