Implement standardised Ubuntu Cloud Archive repo vars

This patch implemented the vars for UCA which are present in the
os_nova and ceph_client roles in order to improve consistency and
easier overriding of any of the chosen parts.

The tasks implementing the UCA configuration are also slightly
adjusted to be a little more robust and complete.

Change-Id: I5ab9238245932de7f3ffc07ffe52725616f4f637
This commit is contained in:
Jesse Pretorius 2016-07-01 13:12:45 +01:00
parent 40cc729f8c
commit 1f29cdcf2b
3 changed files with 19 additions and 10 deletions

View File

@ -13,20 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Add Ubuntu Cloud Archive Keyring package
- name: Add Ubuntu Cloud Archive keyring
apt:
pkg: ubuntu-cloud-keyring
register: add_keys
state: latest
register: add_uca_keys
- name: Enable OVS repo
- name: Add Ubuntu Cloud Archive Repository
apt_repository:
repo: "{{ ovs_apt_repo }}"
repo: "{{ uca_repo }}"
state: present
register: add_uca_repo
- name: Update apt after OVS repo
- name: Update apt cache after repo addition
apt:
update_cache: yes
when: add_keys.changed
when: add_uca_keys | changed or
add_uca_repo | changed
- name: Install apt packages
apt:

View File

@ -13,7 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ovs_apt_repo: 'deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/mitaka main'
# There are no UCA packages for Trusty beyond Mitaka, so the selected
# release here has to remain at Mitaka.
uca_openstack_release: mitaka
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
ovs_apt_packages:
- openvswitch-common

View File

@ -13,9 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# This has to be reworked because openvswitch packages are not part of the UCA now
# current version is included in mainstream xenial.
ovs_apt_repo: 'deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton main'
uca_openstack_release: newton
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
ovs_apt_packages:
- openvswitch-common