summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2017-09-07 10:41:36 -0400
committerDan Radez <dradez@redhat.com>2017-09-07 10:55:47 -0400
commitd1131e2121dd8a5532660ebdd1be4cc14dd955dc (patch)
tree46813838c36e32e07249774665924cedf58309ef
parentc864613222ed1b85306deba7991df1a89b56c897 (diff)
Output ansible's output to info log
Change-Id: I27ad54785716677a885ae954a2af6dbaf8610ff1 Signed-off-by: Dan Radez <dradez@redhat.com>
-rw-r--r--apex/common/utils.py6
1 files 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'))))