From eac4cf0b23305290a3fae45d019b932c3b3826df Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 7 Dec 2022 13:24:06 +0100 Subject: [PATCH] Do not run neutron upgrade when no hosts in group We not always have hosts in neutron_all group. So we skip running neutron migration only when there're neutron hosts in groups. Change-Id: Idac16939f7488cc4dca1fed7ed67c19cd2640c5d --- scripts/upgrade-utilities/define-neutron-plugin.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade-utilities/define-neutron-plugin.yml b/scripts/upgrade-utilities/define-neutron-plugin.yml index 8d553c7f80..761f9db65e 100644 --- a/scripts/upgrade-utilities/define-neutron-plugin.yml +++ b/scripts/upgrade-utilities/define-neutron-plugin.yml @@ -19,8 +19,13 @@ gather_facts: false user: root vars: - neutron_host_to_check: "{{ groups['neutron_all'][0] }}" + neutron_group: 'neutron_all' + neutron_host_to_check: "{{ groups[neutron_group][0] }}" tasks: + - name: End task if neutron is not deployed + meta: end_play + when: not groups[neutron_group] + - name: Define neutron variables for upgrade lineinfile: dest: "{{ openstack_config_dir }}/user_neutron_migration.yml"