From 71e87f7a4149375bcefdf79928b8997113c75aaf Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 8 Oct 2014 13:30:36 -0400 Subject: [PATCH] Throw away everything but the first line when fetching the ansible version --- awx/main/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/utils.py b/awx/main/utils.py index 5a0aac2248..4e4482d4eb 100644 --- a/awx/main/utils.py +++ b/awx/main/utils.py @@ -78,7 +78,8 @@ def get_ansible_version(): proc = subprocess.Popen(['ansible', '--version'], stdout=subprocess.PIPE) result = proc.communicate()[0] - return result.lower().replace('ansible', '').strip() + stripped_result = result.lower().replace('ansible', '').strip() + return stripped_result.split('\n', 1)[0] except: return 'unknown'