mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-17 21:41:47 -05:00
remove ansible_version from the API config and metrics endpoints
AWX no longer includes Ansible on the control plane and there is no "default" version of Ansible aside from what's configured at the Execution Environment level see: https://github.com/ansible/awx/issues/9472
This commit is contained in:
@@ -44,7 +44,6 @@ __all__ = [
|
||||
'underscore_to_camelcase',
|
||||
'memoize',
|
||||
'memoize_delete',
|
||||
'get_ansible_version',
|
||||
'get_licenser',
|
||||
'get_awx_http_client_headers',
|
||||
'get_awx_version',
|
||||
@@ -192,20 +191,6 @@ def memoize_delete(function_name):
|
||||
return cache.delete(function_name)
|
||||
|
||||
|
||||
@memoize()
|
||||
def get_ansible_version():
|
||||
"""
|
||||
Return Ansible version installed.
|
||||
Ansible path needs to be provided to account for custom virtual environments
|
||||
"""
|
||||
try:
|
||||
proc = subprocess.Popen(['ansible', '--version'], stdout=subprocess.PIPE)
|
||||
result = smart_str(proc.communicate()[0])
|
||||
return result.split('\n')[0].replace('ansible', '').strip()
|
||||
except Exception:
|
||||
return 'unknown'
|
||||
|
||||
|
||||
def get_awx_version():
|
||||
"""
|
||||
Return AWX version as reported by setuptools.
|
||||
|
||||
Reference in New Issue
Block a user