Remove Trusty support form lxc_hosts role

Change-Id: I90afc3bbec9eaaaeef76efc5e0a3ca2e9cf87ef4
Implements: blueprint trusty-removal
This commit is contained in:
Andy McCrae 2016-12-15 11:16:19 +00:00
parent 1eb088d49a
commit 1eddafec76
6 changed files with 2 additions and 169 deletions

2
Vagrantfile vendored
View File

@ -1,5 +1,5 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2

View File

@ -32,7 +32,7 @@ libselinux-python [platform:rpm]
# For SSL SNI support
python-pyasn1 [platform:dpkg]
python-openssl [platform:dpkg]
python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-trusty]
python-ndg-httpsclient [platform:ubuntu]
python2-pyasn1 [platform:rpm]
pyOpenSSL [platform:rpm]
python-ndg_httpsclient [platform:rpm]

View File

@ -31,7 +31,6 @@
service:
name: "irqbalance"
state: "restarted"
pattern: "irqbalance"
enabled: "yes"
- name: Restart bridge

View File

@ -22,7 +22,6 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- trusty
- xenial
- name: EL
versions:

View File

@ -41,21 +41,6 @@
tags:
- lxc-net
# All installations of LXC will need to have the
# the lxc-net service override in place to ensure its not restarted on system boot
- name: Drop lxc-net override file for upstart
template:
src: manual-init.override.j2
dest: /etc/init/lxc-net.override
owner: root
group: root
mode: 0644
when:
- ansible_service_mgr == 'upstart'
tags:
- lxc-files
- lxc-net
- name: Mask lxc-net systemd service
file:
src: /dev/null

View File

@ -1,150 +0,0 @@
---
# Copyright 2016, 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.
## APT Cache Options
cache_timeout: 600
# Required apt packages.
lxc_hosts_distro_packages:
- apparmor
- apparmor-utils
- bridge-utils
- cgmanager
- cgroup-lite
- debootstrap
- dnsmasq
- git
- irqbalance
- language-pack-en
- liblxc1
- lxc
- lxc-dev
- lxc-templates
- python-dev
- python3-lxc
- pxz
lxc_xz_bin: pxz
system_config_dir: "/etc/default"
lxc_cache_map:
distro: ubuntu
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
release: trusty
copy_from_host:
- /etc/apt/sources.list
- /etc/apt/apt.conf.d/
- /etc/localtime
- /root/repo.keys
cache_prep_commands: |
if [ -a /etc/resolv.conf ]; then
mv /etc/resolv.conf /etc/resolv.conf.org
fi
echo "nameserver {{ lxc_net_address }}" > /etc/resolv.conf
apt-key add /root/repo.keys
rm /root/repo.keys
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y {{ lxc_cache_install_debconf }} {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y {{ lxc_cache_install_debconf }}
rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
mkdir -p /root/.ssh
chmod 700 /root/.ssh
userdel --force --remove ubuntu || true
apt-get clean
mkdir -p /var/backup
echo -e '{{ lxc_container_default_interfaces }}' | tee /etc/network/interfaces
mkdir -p /etc/network/interfaces.d
chage -I -1 -d -1 -m 0 -M 99999 -E -1 root
if [ -a /etc/resolv.conf.org ]; then
mv /etc/resolv.conf.org /etc/resolv.conf
else
rm -f /etc/resolv.conf
fi
# This forces any modified configurations to remain, and any unmodified configs to be replaced
# ref: http://serverfault.com/questions/259226/automatically-keep-current-version-of-config-files-when-apt-get-install
lxc_cache_install_debconf: '-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes'
lxc_cache_distro_packages:
- apt-transport-https
- bridge-utils
- bsdmainutils
- build-essential
- ca-certificates
- cgmanager
- cgmanager-utils
- cgroup-lite
- comerr-dev
- curl
- debconf-utils
- debhelper
- dh-apparmor
- gettext
- gir1.2-glib-2.0
- git
- groff-base
- intltool-debian
- iptables
- iso-codes
- krb5-multidev
- libcgmanager-dev
- libdbus-1-dev
- libdbus-glib-1-2
- libdevmapper-event1.02.1
- libexpat1-dev
- libffi-dev
- libpq-dev
- libpq5
- libpython-dev
- libxml2-dev
- libxslt1-dev
- libxslt1.1
- lvm2
- openssh-server
- python2.7
- python-apt
- python-apt-common
- python-dev
- python-pycurl
- python-software-properties
- python3-apt
- python3-dbus
- python3-gi
- python3-minimal
- python3-pycurl
- python3-software-properties
- software-properties-common
- sqlite3
- ssh
- sshpass
- time
lxc_cached_network_interfaces:
- src: "lxc-net-bridge.cfg.j2"
dest: "/etc/network/interfaces.d/lxc-net-bridge.cfg"
lxc_container_default_interfaces: |
# The loopback network interface
auto lo
iface lo inet loopback
# LXC interface, this is ALWAYS assumed to be DHCP.
auto eth0
iface eth0 inet dhcp
# Load any additional configs
source /etc/network/interfaces.d/*.cfg
lxc_default_release: "trusty-backports"