Prefix install_openstacksdk variable

Rename install_openstacksdk to install_ansible_opensatcksdk to make it
clear this is part of the install-ansible role, and it's the
openstacksdk version used with ansible (might be important if we
switch to virtualenvs). This also clears up inconsistency when we add
ARA install options too.

Change-Id: Ie8cb3d5651322b3f6d2de9d6d80964b0d2822dce
This commit is contained in:
David Moreau Simard 2018-12-04 17:42:06 -05:00
parent 56ee3a67ba
commit dd554dbd02
No known key found for this signature in database
GPG Key ID: CBEB466764A9E621
3 changed files with 13 additions and 13 deletions

View File

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

View File

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

View File

@ -29,23 +29,23 @@
# openstacksdk # openstacksdk
- name: Set openstacksdk default version to latest - name: Set openstacksdk default version to latest
set_fact: set_fact:
install_openstacksdk_version: latest install_ansible_openstacksdk_version: latest
when: install_openstacksdk_version is not defined when: install_ansible_openstacksdk_version is not defined
- name: Set openstacksdk version for installation - name: Set openstacksdk version for installation
set_fact: set_fact:
_install_openstacksdk_version: '{{ install_openstacksdk_version }}' _install_ansible_openstacksdk_version: '{{ install_ansible_openstacksdk_version }}'
when: install_openstacksdk_version not in ('', 'latest') when: install_ansible_openstacksdk_version not in ('', 'latest')
- name: Set openstacksdk package state for installation - name: Set openstacksdk package state for installation
set_fact: set_fact:
_install_openstacksdk_state: latest _install_openstacksdk_state: latest
when: install_openstacksdk_version == 'latest' when: install_ansible_openstacksdk_version == 'latest'
- name: Install openstacksdk - name: Install openstacksdk
pip: pip:
name: '{{ install_openstacksdk_name | default("openstacksdk") }}' name: '{{ install_ansible_openstacksdk_name | default("openstacksdk") }}'
version: '{{ _install_openstacksdk_version | default(omit) }}' version: '{{ _install_ansible_openstacksdk_version | default(omit) }}'
state: '{{ _install_openstacksdk_state | default(omit) }}' state: '{{ _install_openstacksdk_state | default(omit) }}'
- name: Ensure /etc/ansible and /etc/ansible/hosts - name: Ensure /etc/ansible and /etc/ansible/hosts