mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Some slight improvements in ansible version detection in tower where
that's used
This commit is contained in:
parent
487f652abe
commit
ffec2a19ae
@ -98,8 +98,8 @@ def get_ansible_version():
|
||||
proc = subprocess.Popen(['ansible', '--version'],
|
||||
stdout=subprocess.PIPE)
|
||||
result = proc.communicate()[0]
|
||||
stripped_result = result.lower().replace('ansible', '').strip()
|
||||
return stripped_result.split('\n', 1)[0]
|
||||
stripped_result = result.lower().replace('ansible', '').strip().split(" ")[0]
|
||||
return stripped_result
|
||||
except:
|
||||
return 'unknown'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user