Skip to content
Snippets Groups Projects
Commit 2d32083a authored by Jeffrey Zhang's avatar Jeffrey Zhang Committed by Jeffrey Zhang
Browse files

Detect openstack_release variable when it auto

Get openstack_release variable from kolla-ansible version number when it
is auto.

Change-Id: Ibd0d8f85aed9d8198218c0dc85c367b331815100
parent 78b8f47b
No related branches found
No related tags found
No related merge requests found
...@@ -233,7 +233,7 @@ admin_protocol: "http" ...@@ -233,7 +233,7 @@ admin_protocol: "http"
#################### ####################
# OpenStack options # OpenStack options
#################### ####################
openstack_release: "4.0.0" openstack_release: "auto"
openstack_logging_debug: "False" openstack_logging_debug: "False"
openstack_region_name: "RegionOne" openstack_region_name: "RegionOne"
......
...@@ -31,6 +31,21 @@ ...@@ -31,6 +31,21 @@
when: when:
- (play_hosts | length) != (groups['all'] | length) - (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 - name: Apply role prechecks
hosts: hosts:
- all - all
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#kolla_install_type: "binary" #kolla_install_type: "binary"
# Valid option is Docker repository tag # Valid option is Docker repository tag
#openstack_release: "4.0.0" #openstack_release: "auto"
# Location of configuration overrides # Location of configuration overrides
#node_custom_config: "/etc/kolla/config" #node_custom_config: "/etc/kolla/config"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment