mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 16:07:30 -02:30
Throw away everything but the first line when fetching the ansible version
This commit is contained in:
@@ -78,7 +78,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]
|
||||||
return result.lower().replace('ansible', '').strip()
|
stripped_result = result.lower().replace('ansible', '').strip()
|
||||||
|
return stripped_result.split('\n', 1)[0]
|
||||||
except:
|
except:
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user