bridge.o.o: Use latest openstacksdk

Similar to the pinning introduced in
Ic465efb637c0a1eb475f04b0b0e356d8797ecdeb, use the "latest"
openstacksdk package and allow for passing of pinned versions if
required.

Update the devel test to also use the master of opensatcksdk

Change-Id: I4b437ca9024c87903bdd3569c8309cde725ce28e
This commit is contained in:
Ian Wienand 2018-11-07 08:12:20 +11:00
parent 24c81fb0c3
commit 06da49c6e2
4 changed files with 43 additions and 2 deletions

View File

@ -165,9 +165,12 @@
required-projects:
- name: github.com/ansible/ansible
override-checkout: devel
- name: openstack/openstacksdk
vars:
bridge_ansible_name: '{{ ansible_user_dir}}/src/github.com/ansible/ansible'
bridge_ansible_version: null
bridge_openstacksdk_name: '{{ ansible_user_dir }}/src/git.openstack.org/openstack/openstacksdk'
bridge_openstacksdk_version: null
- job:
name: system-config-run-eavesdrop

View File

@ -8,6 +8,8 @@
- role: install-ansible
install_ansible_name: '{{ bridge_ansible_name | default("ansible") }}'
install_ansible_version: '{{ bridge_ansible_version | default("2.7.0") }}'
install_openstacksdk_name: '{{ bridge_openstacksdk_name | default("openstacksdk") }}'
install_openstacksdk_version: '{{ bridge_openstacksdk_verison | default("latest") }}'
- root-keys
- ansible-cron
- cloud-launcher-cron

View File

@ -19,3 +19,21 @@ Install and configure Ansible on a host via pip
:zuul:rolevar:`install-ansible.install_ansible_name`. The special
value "latest" will ensure ``state: latest`` is set for the
package and thus the latest version is always installed.
.. zuul:rolevar:: install_openstacksdk_name
:default: openstacksdk
The name of the openstacksdk package to install. To install from
alternative sources, this can be a URL for a remote package;
e.g. to install from a gerrit change
``git+https://git.openstack.org/openstack/openstacksdk@refs/changes/12/3456/1#egg=openstacksdk``
.. zuul:rolevar:: install_openstacksdk_version
:default: latest
The version of the library from
:zuul:rolevar:`install-ansible.install_openstacksdk_name`. Set
this to empty (YAML ``null``) if specifying versions via
:zuul:rolevar:`install-ansible.install_openstacksdk_name`. The
special value "latest" will ensure ``state: latest`` is set for the
package and thus the latest version is always installed.

View File

@ -25,10 +25,28 @@
version: '{{ _install_ansible_version | default(omit) }}'
state: '{{ _install_ansible_state | default(omit) }}'
# Same version/state default swizzling as described above for
# openstacksdk
- name: Set openstacksdk default version to latest
set_fact:
install_openstacksdk_version: latest
when: install_openstacksdk_version is not defined
- name: Set openstacksdk version for installation
set_fact:
_install_openstacksdk_version: '{{ install_openstacksdk_version }}'
when: install_openstacksdk_version not in ('', 'latest')
- name: Set openstacksdk package state for installation
set_fact:
_install_openstacksdk_state: latest
when: install_openstacksdk_version == 'latest'
- name: Install openstacksdk
pip:
state: latest
name: openstacksdk
name: '{{ install_openstacksdk_name | default("openstacksdk") }}'
version: '{{ _install_openstacksdk_version | default(omit) }}'
state: '{{ _install_openstacksdk_state | default(omit) }}'
- name: Ensure /etc/ansible and /etc/ansible/hosts
file: