mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Throw away everything but the first line when fetching the ansible version
This commit is contained in:
parent
adb06fba4a
commit
71e87f7a41
@ -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'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user