From d1131e2121dd8a5532660ebdd1be4cc14dd955dc Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Thu, 7 Sep 2017 10:41:36 -0400 Subject: Output ansible's output to info log Change-Id: I27ad54785716677a885ae954a2af6dbaf8610ff1 Signed-off-by: Dan Radez --- apex/common/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apex/common/utils.py b/apex/common/utils.py index 848f2644..e21ab835 100644 --- a/apex/common/utils.py +++ b/apex/common/utils.py @@ -76,7 +76,7 @@ def run_ansible(ansible_vars, playbook, host='localhost', user='root', else: conn_type = 'smart' ansible_command = ['ansible-playbook', '--become', '-i', inv_host, - '-u', user, '-c', conn_type, playbook, '-vvv'] + '-u', user, '-c', conn_type, playbook, '-vv'] if dry_run: ansible_command.append('--check') @@ -99,8 +99,8 @@ def run_ansible(ansible_vars, playbook, host='localhost', user='root', my_env = os.environ.copy() my_env['ANSIBLE_HOST_KEY_CHECKING'] = 'False' logging.info("Executing playbook...this may take some time") - logging.debug(subprocess.check_output(ansible_command, env=my_env, - stderr=subprocess.STDOUT).decode('utf-8')) + logging.info(subprocess.check_output(ansible_command, env=my_env, + stderr=subprocess.STDOUT).decode('utf-8')) except subprocess.CalledProcessError as e: logging.error("Error executing ansible: {}".format( pprint.pformat(e.output.decode('utf-8')))) -- cgit 1.2.3-korg