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 <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2022-03-23 08:40:00 -05:00 committed by Kevin Carter
parent 1cc380a268
commit ebad3a2095
1 changed files with 2 additions and 3 deletions

View File

@ -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