Force the uca filename

Defining staticly the UCA filename allows us to know in advance
which file to copy from host in the lxc_host role.

We remove here previously defined or default UCA filenames for
the same branch.

Change-Id: If6e3fe6b6c24570c34fe7bab358aed59340f379c
This commit is contained in:
Jean-Philippe Evrard 2017-12-02 12:20:09 +00:00
parent 190c9f220f
commit 754348632f
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,11 @@
---
upgrade:
- |
Any user that is coming from Pike or below on Ubuntu should modify
its ``user_external_repos_list``, switching its ubuntu cloud archive
repository from ``state: present`` to ``state: absent``.
From now on, UCA will be defined with the filename ``uca``. If the deployer
wants to use its mirror, he can still override the variable ``uca_repo``
to point to its mirror. Alternatively, the deployer can completely define
which repos to add and remove, ignoring our defaults, by overriding
``openstack_hosts_package_repos``.

View File

@ -89,6 +89,16 @@ _package_list:
state: "{{ openstack_hosts_package_state }}"
_package_repos:
# For convention over configuration, this removes any UCA configuration with
# default filename, or user defined filename.
# Deployers can/should use this facility to remove any previously user defined
# repositories.
# TODO(evrardjp): Add a similar 3 liner when we bump the uca_repo to Queens,
# to have both queens and Pike removed.
- repo: "{{ uca_repo }}"
state: absent
filename: "{{ uca_apt_source_list_filename | default('ubuntu_cloud_archive_canonical_com_ubuntu') }}"
# Always use UCA filename
- repo: "{{ uca_repo }}"
state: present
filename: "{{ uca_apt_source_list_filename | default(omit) }}"
filename: "uca"