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
This commit is contained in:
Jesse Pretorius 2016-02-09 19:02:49 +00:00 committed by Jesse Pretorius (odyssey4me)
parent 3fdd67d715
commit 85d3229124
2 changed files with 9 additions and 4 deletions

View File

@ -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.

View File

@ -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(" ") }}