From 0f1f009a853cdb6571059a43f33e81f3134d5f4a Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 28 Nov 2023 13:21:53 +0000 Subject: [PATCH] CI: Run configuration dump against localhost Since using the to_bool function in more places in I3a5a43fef9c3d68d0db02be12b9f892c437e513d, we are now more strict about the result of the variable dump. If there are no controllers in the inventory, the result will not be a valid boolean and the to_bool function will exit non-zero. This change fixes the issue by running against localhost, which should always be in the inventory. Change-Id: Idcfd9d335f11f6c4d676033128d207f62b363ee9 --- dev/functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/functions b/dev/functions index 33d7a4aba..8614897d0 100644 --- a/dev/functions +++ b/dev/functions @@ -232,22 +232,22 @@ function upgrade_kayobe_venv { # Deployment function is_deploy_image_built_locally { - ipa_build_images=$(kayobe configuration dump --host controllers[0] --var-name ipa_build_images) + ipa_build_images=$(kayobe configuration dump --host localhost --var-name ipa_build_images) to_bool "$ipa_build_images" } function is_ironic_enabled { - ironic_enabled=$(kayobe configuration dump --host controllers[0] --var-name kolla_enable_ironic) + ironic_enabled=$(kayobe configuration dump --host localhost --var-name kolla_enable_ironic) to_bool "$ironic_enabled" } function is_overcloud_host_image_built_by_dib { - overcloud_dib_build_host_images=$(kayobe configuration dump --host controllers[0] --var-name overcloud_dib_build_host_images) + overcloud_dib_build_host_images=$(kayobe configuration dump --host localhost --var-name overcloud_dib_build_host_images) to_bool "$overcloud_dib_build_host_images" } function is_cinder_enabled { - flag="$(run_kayobe configuration dump --host controllers[0] --var-name kolla_enable_cinder)" + flag="$(run_kayobe configuration dump --host localhost --var-name kolla_enable_cinder)" to_bool "$flag" }