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:
Ryan Petrello
2021-03-24 22:02:17 -04:00
parent ecc839169a
commit db20bbe682
7 changed files with 6 additions and 43 deletions

View File

@@ -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.