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