From 85d3229124b4dee279b4e5c21b0552a8c2c6b277 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 9 Feb 2016 19:02:49 +0000 Subject: [PATCH] Set AIO host apt sources to use a configured list of components re: http://lists.openstack.org/pipermail/openstack-dev/2016-February/086000.html Ubuntu has 4 different 'components' - main, universe, multiverse and restricted: - Main: Officially supported software. - Restricted: Supported software that is not available under a completely free license. - Universe: Community maintained software, i.e. not officially supported software. - Multiverse: Software that is not free. Practically speaking there should be nothing particularly useful to OpenStack-Ansible in Restricted or Multiverse - it's mostly software for desktop users. This patch introduces a new variable 'bootstrap_host_apt_components' which is a list of the components to configure in the apt sources list. The default list does not include the unnecessary components. Change-Id: I4171453cd2fb25d8867bb2dc8fc0337eb82d032e --- tests/roles/bootstrap-host/defaults/main.yml | 5 +++++ tests/roles/bootstrap-host/templates/apt-sources.list.j2 | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml index a5d25638b6..ec6691d828 100644 --- a/tests/roles/bootstrap-host/defaults/main.yml +++ b/tests/roles/bootstrap-host/defaults/main.yml @@ -98,6 +98,11 @@ bootstrap_host_mongodb_address: 172.29.236.100 #bootstrap_host_ubuntu_repo: http://archive.ubuntu.com/ubuntu/ #bootstrap_host_ubuntu_security_repo: http://archive.ubuntu.com/ubuntu/ +# Set the components that will be included in the apt repository configuration +bootstrap_host_apt_components: + - main + - universe + # Specify the public IP address for the host. # By default the address will be set to the ipv4 address of the # host's network interface that has the default route on it. diff --git a/tests/roles/bootstrap-host/templates/apt-sources.list.j2 b/tests/roles/bootstrap-host/templates/apt-sources.list.j2 index 20f4e0b33d..8a632a1092 100644 --- a/tests/roles/bootstrap-host/templates/apt-sources.list.j2 +++ b/tests/roles/bootstrap-host/templates/apt-sources.list.j2 @@ -1,10 +1,10 @@ # {{ ansible_managed }} # Base repositories -deb {{ bootstrap_host_ubuntu_repo }} {{ ansible_distribution_release }} main restricted universe multiverse +deb {{ bootstrap_host_ubuntu_repo }} {{ ansible_distribution_release }} {{ bootstrap_host_apt_components | join(" ") }} # Updates repositories -deb {{ bootstrap_host_ubuntu_repo }} {{ ansible_distribution_release }}-updates main restricted universe multiverse +deb {{ bootstrap_host_ubuntu_repo }} {{ ansible_distribution_release }}-updates {{ bootstrap_host_apt_components | join(" ") }} # Backports repositories -deb {{ bootstrap_host_ubuntu_repo }} {{ ansible_distribution_release }}-backports main restricted universe multiverse +deb {{ bootstrap_host_ubuntu_repo }} {{ ansible_distribution_release }}-backports {{ bootstrap_host_apt_components | join(" ") }} # Security repositories -deb {{ bootstrap_host_ubuntu_security_repo }} {{ ansible_distribution_release }}-security main restricted universe multiverse +deb {{ bootstrap_host_ubuntu_security_repo }} {{ ansible_distribution_release }}-security {{ bootstrap_host_apt_components | join(" ") }}