From fca91fe83ed1f7223a4fdbed9e7803a3555bcc86 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 12 Nov 2018 10:28:35 +0000 Subject: 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 --- ansible/bifrost.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'ansible/bifrost.yml') diff --git a/ansible/bifrost.yml b/ansible/bifrost.yml index 1769ce8e2..2adedcc1d 100644 --- a/ansible/bifrost.yml +++ b/ansible/bifrost.yml @@ -1,19 +1,7 @@ --- -- 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 +- import_playbook: detect-release.yml + vars: + detect_release_hosts: bifrost - name: Apply role bifrost hosts: bifrost -- cgit v1.2.3