kolla-ansible/ansible/detect-release.yml
Mark Goddard fca91fe83e Factor out OpenStack release detection playbook
We copy-paste the same play into various playbooks to detect
openstack_release. This change factors that code into a separate
playbook that is imported.

Change-Id: I5fea005642b960080bf5e43455618dc24766c386
2018-11-29 15:49:41 +00:00

17 lines
559 B
YAML

---
- name: Detect openstack_release variable
hosts: "{{ detect_release_hosts }}"
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