From fb5b7bcd8b6a702d64405fab605297b504cf496e Mon Sep 17 00:00:00 2001 From: "Gael Chamoulaud (Strider)" Date: Thu, 29 Jul 2021 15:45:11 +0200 Subject: [PATCH] Fix Inventory Generation without Overcloud deployed The utils.list_plan_and_stack function returns None in case of exceptions or and empty list if no stacks or no plans have been found in the environment. This patch fixes the conditional to allow the tripleo-ansible-inventory script to generate only the undercloud Inventory when no Overcloud has been deployed. Related-bz: rhbz#1987318 Signed-off-by: Gael Chamoulaud (Strider) Change-Id: If0dc3300fbd8cf245c0477be782110d897344860 (cherry picked from commit 5a8cfac7f98f15a2964ea7fcabb3d68a4355385e) (cherry picked from commit 9289704779b9bd520be82db9b01ba8e28c6e1563) (cherry picked from commit 8ad642f5385f10035d520b44de6e08d48227448c) (cherry picked from commit 1e9ba890302b37f9749ae30ca4ef2cc5950c94e7) --- scripts/tripleo-ansible-inventory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tripleo-ansible-inventory b/scripts/tripleo-ansible-inventory index 29bd85c2c..e63ca6c6e 100755 --- a/scripts/tripleo-ansible-inventory +++ b/scripts/tripleo-ansible-inventory @@ -179,7 +179,7 @@ def main(): utils.get_heat_client(auth_variables), utils.get_swift_client(auth_variables)) - if plans is None: + if not plans: inventory = inv.TripleoInventory( session=utils.get_auth_session(auth_variables), hclient=utils.get_heat_client(auth_variables),