diff --git a/releasenotes/notes/dnsmasq-lxc-conflict-fix-c8968f6a16d033c6.yaml b/releasenotes/notes/dnsmasq-lxc-conflict-fix-c8968f6a16d033c6.yaml new file mode 100644 index 00000000..e240a38c --- /dev/null +++ b/releasenotes/notes/dnsmasq-lxc-conflict-fix-c8968f6a16d033c6.yaml @@ -0,0 +1,10 @@ +--- +fixes: + - | + In Ubuntu the ``dnsmasq`` package actually includes + init scripts and service configuration which + conflict with LXC and are best not included. The + actual dependent package is ``dnsmasq-base``. The + package list has been adjusted and a task added + to remove the ``dnsmasq`` package and purge the + related configuration files from all LXC hosts. diff --git a/tasks/lxc_dnsmasq_cleanup.yml b/tasks/lxc_dnsmasq_cleanup.yml deleted file mode 100644 index 7ef23a7d..00000000 --- a/tasks/lxc_dnsmasq_cleanup.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# Copyright 2014, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- name: Ensure dnsmasq stopped - service: - name: "dnsmasq" - state: "stopped" - enabled: "no" - -- name: Remove dnsmasq file(s) - file: - path: "{{ item }}" - state: "absent" - with_items: - - /var/run/dnsmasq/resolv.conf - - /etc/dnsmasq.conf diff --git a/tasks/lxc_install_apt.yml b/tasks/lxc_install_apt.yml index 37e9a9a9..54115166 100644 --- a/tasks/lxc_install_apt.yml +++ b/tasks/lxc_install_apt.yml @@ -13,6 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Remove conflicting packages + apt: + pkg: "{{ lxc_hosts_remove_distro_packages }}" + state: absent + purge: yes + tags: + - lxc-apt-packages + - name: Install apt packages apt: pkg: "{{ lxc_hosts_distro_packages }}" diff --git a/tasks/main.yml b/tasks/main.yml index b119f86b..4dbe5284 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -62,10 +62,6 @@ tags: - lxc_hosts-config -- include: lxc_dnsmasq_cleanup.yml - tags: - - lxc_hosts-config - - include: lxc_cache.yml tags: - lxc_hosts-install diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index e3383ff3..457790c3 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -26,7 +26,7 @@ lxc_hosts_distro_packages: - cgroup-lite - dbus - debootstrap - - dnsmasq + - dnsmasq-base - git - iptables - irqbalance @@ -40,6 +40,10 @@ lxc_hosts_distro_packages: - systemd-container - pxz +# Package to remove from the host +lxc_hosts_remove_distro_packages: + - dnsmasq + lxc_xz_bin: pxz system_config_dir: "/etc/default"