Rename package lists (and related vars) appropriately

In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: I09a21bac75a48450850313d2fe6d57aac311ce65
This commit is contained in:
Jesse Pretorius 2016-08-30 16:13:18 +01:00
parent cef267ceab
commit fe749b5d7d
6 changed files with 15 additions and 14 deletions

View File

@ -0,0 +1,4 @@
---
upgrade:
- The variable ``lxc_apt_packages`` has been renamed to
``lxc_hosts_distro_packages``.

View File

@ -39,7 +39,7 @@
until: install_packages|success until: install_packages|success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: "{{ lxc_packages }}" with_items: "{{ lxc_hosts_distro_packages }}"
tags: tags:
- lxc-apt-packages - lxc-apt-packages

View File

@ -21,7 +21,7 @@
until: install_packages|success until: install_packages|success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: "{{ lxc_packages }}" with_items: "{{ lxc_hosts_distro_packages }}"
tags: tags:
- lxc-packages - lxc-packages

View File

@ -16,7 +16,7 @@
lxc_download_url: "https://linuxcontainers.org/downloads/lxc/lxc-2.0.4.tar.gz" lxc_download_url: "https://linuxcontainers.org/downloads/lxc/lxc-2.0.4.tar.gz"
# Required rpm packages. # Required rpm packages.
lxc_packages: lxc_hosts_distro_packages:
- '@Development Tools' - '@Development Tools'
- automake - automake
- autoconf - autoconf
@ -50,7 +50,7 @@ lxc_cache_map:
mv /etc/resolv.conf /etc/resolv.conf.org mv /etc/resolv.conf /etc/resolv.conf.org
fi fi
echo "nameserver {{ lxc_net_address }}" > /etc/resolv.conf echo "nameserver {{ lxc_net_address }}" > /etc/resolv.conf
yum install -y {{ lxc_cache_packages | join(' ') }} yum install -y {{ lxc_cache_distro_packages | join(' ') }}
rm -f /usr/bin/python rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python ln -s /usr/bin/python2.7 /usr/bin/python
/usr/bin/wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -O /tmp/epel-release-latest-7.noarch.rpm /usr/bin/wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -O /tmp/epel-release-latest-7.noarch.rpm
@ -72,7 +72,7 @@ lxc_cache_map:
rm -f /etc/resolv.conf rm -f /etc/resolv.conf
fi fi
lxc_cache_packages: lxc_cache_distro_packages:
- ca-certificates - ca-certificates
- openssh-server - openssh-server
- python2 - python2

View File

@ -17,7 +17,7 @@
cache_timeout: 600 cache_timeout: 600
# Required apt packages. # Required apt packages.
lxc_packages: lxc_hosts_distro_packages:
- apparmor - apparmor
- apparmor-utils - apparmor-utils
- bridge-utils - bridge-utils
@ -53,7 +53,7 @@ lxc_cache_map:
rm /root/repo.keys rm /root/repo.keys
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
apt-get update apt-get update
apt-get install -y {{ lxc_cache_install_debconf }} {{ lxc_cache_packages | join(' ') }} apt-get install -y {{ lxc_cache_install_debconf }} {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y {{ lxc_cache_install_debconf }} apt-get upgrade -y {{ lxc_cache_install_debconf }}
rm -f /usr/bin/python rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python ln -s /usr/bin/python2.7 /usr/bin/python
@ -82,7 +82,7 @@ lxc_cache_map:
# ref: http://serverfault.com/questions/259226/automatically-keep-current-version-of-config-files-when-apt-get-install # 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_install_debconf: '-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes'
lxc_cache_packages: lxc_cache_distro_packages:
- apt-transport-https - apt-transport-https
- bridge-utils - bridge-utils
- bsdmainutils - bsdmainutils

View File

@ -17,7 +17,7 @@
cache_timeout: 600 cache_timeout: 600
# Required apt packages. # Required apt packages.
lxc_packages: lxc_hosts_distro_packages:
- apparmor - apparmor
- apparmor-utils - apparmor-utils
- bridge-utils - bridge-utils
@ -41,9 +41,6 @@ lxc_cache_map:
distro: ubuntu distro: ubuntu
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}" arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
release: xenial release: xenial
cache_packages:
- apt-transport-https
- openssh-server
copy_from_host: copy_from_host:
- /etc/apt/sources.list - /etc/apt/sources.list
- /etc/apt/apt.conf.d/ - /etc/apt/apt.conf.d/
@ -57,7 +54,7 @@ lxc_cache_map:
rm /root/repo.keys rm /root/repo.keys
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
apt-get update apt-get update
apt-get install -y {{ lxc_cache_install_debconf }} {{ lxc_cache_packages | join(' ') }} apt-get install -y {{ lxc_cache_install_debconf }} {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y {{ lxc_cache_install_debconf }} apt-get upgrade -y {{ lxc_cache_install_debconf }}
rm -f /usr/bin/python rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python ln -s /usr/bin/python2.7 /usr/bin/python
@ -86,7 +83,7 @@ lxc_cache_map:
# ref: http://serverfault.com/questions/259226/automatically-keep-current-version-of-config-files-when-apt-get-install # 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_install_debconf: '-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes'
lxc_cache_packages: lxc_cache_distro_packages:
- apt-transport-https - apt-transport-https
- ca-certificates - ca-certificates
- iptables - iptables