fixes config endpoint performance issue

This commit is contained in:
Chris Meyers
2016-04-13 17:28:38 -04:00
parent 3e479d5602
commit 043f97fe35
4 changed files with 33 additions and 0 deletions

View File

@@ -97,6 +97,9 @@ def get_ansible_version():
'''
Return Ansible version installed.
'''
from django.conf import settings
if hasattr(settings, 'ANSIBLE_VERSION'):
return settings.ANSIBLE_VERSION
try:
proc = subprocess.Popen(['ansible', '--version'],
stdout=subprocess.PIPE)