Ubuntu: Use dnsmasq-base, not dnsmasq

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'.

With this change, the cleanup is no longer
required because the files are removed by the
purge or not installed in the first place.

Closes-Bug: #1711140
Change-Id: I0b0a8dec3943651f379479ea1a3b8038736b9219
(cherry picked from commit d5bef82dfe)
This commit is contained in:
Jesse Pretorius 2017-08-16 14:43:45 +01:00 committed by Jesse Pretorius (odyssey4me)
parent ef80a84b93
commit af36d8458d
5 changed files with 23 additions and 33 deletions

View File

@ -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.

View File

@ -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

View File

@ -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 }}"

View File

@ -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

View File

@ -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"