aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2018-03-08 10:12:21 +0000
committerMark Goddard <mark@stackhpc.com>2018-03-08 10:13:32 +0000
commit862f7b281eaeee0b1f74489739e85ab16c740ff3 (patch)
tree6228f3c4627aaf46677abf1dd7980f973ca4034e
parent2f8c9f83fa78b67879a7be6090bf319ac71ee659 (diff)
downloadkolla-ansible-862f7b281eaeee0b1f74489739e85ab16c740ff3.tar.gz
kolla-ansible-862f7b281eaeee0b1f74489739e85ab16c740ff3.zip
Detect openstack_release in kolla-ansible deploy-bifrost
This ensures that the default value of openstack_release - "auto" - is handled correctly when deploying bifrost. Change-Id: I71e6fc5a6b82dc5d6788bf093cd079c45d890ffd
-rw-r--r--ansible/bifrost.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/ansible/bifrost.yml b/ansible/bifrost.yml
index ad02f0539..1769ce8e2 100644
--- a/ansible/bifrost.yml
+++ b/ansible/bifrost.yml
@@ -1,4 +1,20 @@
---
+- name: Detect openstack_release variable
+ hosts: bifrost
+ 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"
+ tags: always
+
- name: Apply role bifrost
hosts: bifrost
roles: