From fe749b5d7d819ab809e41c2d5d068d04148034eb Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 30 Aug 2016 16:13:18 +0100 Subject: [PATCH] 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 --- .../package-list-name-changes-e7a3fc551d742d23.yaml | 4 ++++ tasks/lxc_install_apt.yml | 2 +- tasks/lxc_install_yum.yml | 2 +- vars/redhat-7.yml | 6 +++--- vars/ubuntu-14.04.yml | 6 +++--- vars/ubuntu-16.04.yml | 9 +++------ 6 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/package-list-name-changes-e7a3fc551d742d23.yaml diff --git a/releasenotes/notes/package-list-name-changes-e7a3fc551d742d23.yaml b/releasenotes/notes/package-list-name-changes-e7a3fc551d742d23.yaml new file mode 100644 index 00000000..23d4ffb7 --- /dev/null +++ b/releasenotes/notes/package-list-name-changes-e7a3fc551d742d23.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - The variable ``lxc_apt_packages`` has been renamed to + ``lxc_hosts_distro_packages``. diff --git a/tasks/lxc_install_apt.yml b/tasks/lxc_install_apt.yml index 74f2abc5..286eec08 100644 --- a/tasks/lxc_install_apt.yml +++ b/tasks/lxc_install_apt.yml @@ -39,7 +39,7 @@ until: install_packages|success retries: 5 delay: 2 - with_items: "{{ lxc_packages }}" + with_items: "{{ lxc_hosts_distro_packages }}" tags: - lxc-apt-packages diff --git a/tasks/lxc_install_yum.yml b/tasks/lxc_install_yum.yml index 1b59e63e..aa025ec5 100644 --- a/tasks/lxc_install_yum.yml +++ b/tasks/lxc_install_yum.yml @@ -21,7 +21,7 @@ until: install_packages|success retries: 5 delay: 2 - with_items: "{{ lxc_packages }}" + with_items: "{{ lxc_hosts_distro_packages }}" tags: - lxc-packages diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 1960b467..20aefe51 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -16,7 +16,7 @@ lxc_download_url: "https://linuxcontainers.org/downloads/lxc/lxc-2.0.4.tar.gz" # Required rpm packages. -lxc_packages: +lxc_hosts_distro_packages: - '@Development Tools' - automake - autoconf @@ -50,7 +50,7 @@ lxc_cache_map: mv /etc/resolv.conf /etc/resolv.conf.org fi 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 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 @@ -72,7 +72,7 @@ lxc_cache_map: rm -f /etc/resolv.conf fi -lxc_cache_packages: +lxc_cache_distro_packages: - ca-certificates - openssh-server - python2 diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml index 308618bc..38a36b38 100644 --- a/vars/ubuntu-14.04.yml +++ b/vars/ubuntu-14.04.yml @@ -17,7 +17,7 @@ cache_timeout: 600 # Required apt packages. -lxc_packages: +lxc_hosts_distro_packages: - apparmor - apparmor-utils - bridge-utils @@ -53,7 +53,7 @@ lxc_cache_map: rm /root/repo.keys export DEBIAN_FRONTEND=noninteractive 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 }} rm -f /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 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 - bridge-utils - bsdmainutils diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 84e04e93..e984a084 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -17,7 +17,7 @@ cache_timeout: 600 # Required apt packages. -lxc_packages: +lxc_hosts_distro_packages: - apparmor - apparmor-utils - bridge-utils @@ -41,9 +41,6 @@ lxc_cache_map: distro: ubuntu arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}" release: xenial - cache_packages: - - apt-transport-https - - openssh-server copy_from_host: - /etc/apt/sources.list - /etc/apt/apt.conf.d/ @@ -57,7 +54,7 @@ lxc_cache_map: rm /root/repo.keys export DEBIAN_FRONTEND=noninteractive 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 }} rm -f /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 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 - ca-certificates - iptables