Detect openstack_release variable when it auto
Get openstack_release variable from kolla-ansible version number when it is auto. Change-Id: Ibd0d8f85aed9d8198218c0dc85c367b331815100
This commit is contained in:
parent
78b8f47bd5
commit
2d32083a27
@ -233,7 +233,7 @@ admin_protocol: "http"
|
||||
####################
|
||||
# OpenStack options
|
||||
####################
|
||||
openstack_release: "4.0.0"
|
||||
openstack_release: "auto"
|
||||
openstack_logging_debug: "False"
|
||||
|
||||
openstack_region_name: "RegionOne"
|
||||
|
@ -31,6 +31,21 @@
|
||||
when:
|
||||
- (play_hosts | length) != (groups['all'] | length)
|
||||
|
||||
- name: Detect openstack_release variable
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Get current kolla-ansible version number
|
||||
local_action: command python -c "import pbr.version; print(pbr.version.VersionInfo('kolla-ansible'))"
|
||||
register: kolla_ansible_version
|
||||
changed_when: false
|
||||
when: openstack_release == "auto"
|
||||
|
||||
- name: Set openstack_release variable
|
||||
set_fact:
|
||||
openstack_release: "{{ kolla_ansible_version.stdout }}"
|
||||
when: openstack_release == "auto"
|
||||
|
||||
- name: Apply role prechecks
|
||||
hosts:
|
||||
- all
|
||||
|
@ -17,7 +17,7 @@
|
||||
#kolla_install_type: "binary"
|
||||
|
||||
# Valid option is Docker repository tag
|
||||
#openstack_release: "4.0.0"
|
||||
#openstack_release: "auto"
|
||||
|
||||
# Location of configuration overrides
|
||||
#node_custom_config: "/etc/kolla/config"
|
||||
|
Loading…
Reference in New Issue
Block a user