From ebad3a20950ffb622c2cc579e0ce6f33ec24ab3d Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 23 Mar 2022 08:40:00 -0500 Subject: [PATCH] Move Ansible imports to correct UX Warnings This change moves additional ansible imports to imporve the user experience. Ansible is vendoring packages and rasing a userwarning when potentially conflicting packageson the system. While the ansible userwarning is a good thing, we're maintaining co-installability at this time and the warnings are causing a poor user experience when running deployments. To correct the ux issues we move the ansible imports under the warnings filter. Change-Id: I4a8ecced93d28b70ed6fbcb425754397726850a7 Signed-off-by: Kevin Carter --- tripleoclient/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index f269e8778..d65e2aa37 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -44,8 +44,6 @@ import textwrap import time import yaml -from ansible.parsing.dataloader import DataLoader -from ansible.inventory.manager import InventoryManager from heatclient.common import event_utils from heatclient.common import template_utils from heatclient.common import utils as heat_utils @@ -77,7 +75,8 @@ import warnings warnings.simplefilter("ignore", UserWarning) import ansible_runner # noqa - +from ansible.parsing.dataloader import DataLoader # noqa +from ansible.inventory.manager import InventoryManager # noqa LOG = logging.getLogger(__name__ + ".utils") _local_orchestration_client = None