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
parent c43ed430bb
commit 35cb1ffd23
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
- name: Stat the prepared LXC cache
stat:
path: "{{ lxc_container_cache_path }}/{{ lxc_cache_map.distro }}/{{ lxc_cache_map.release }}/{{ lxc_cache_map.arch }}/{{ lxc_cache_default_variant }}/rootfs.tar.xz"

View File

@ -24,7 +24,7 @@ lxc_hosts_distro_packages:
- cgmanager
- cgroup-lite
- debootstrap
- dnsmasq
- dnsmasq-base
- git
- iptables
- irqbalance
@ -37,6 +37,10 @@ lxc_hosts_distro_packages:
- python3-lxc
- pxz
# Package to remove from the host
lxc_hosts_remove_distro_packages:
- dnsmasq
lxc_xz_bin: pxz
system_config_dir: "/etc/default"