Added support for defining additional environment variables in settings to pass to the subprocess launched by the celery task, specify HOME and USER in settings by default instead of supervisord configuration.

This commit is contained in:
Chris Church
2013-07-16 01:39:17 -04:00
parent 82a9572df8
commit c5f2f2bfaf
7 changed files with 39 additions and 9 deletions

View File

@@ -245,6 +245,21 @@ CELERYD_TASK_SOFT_TIME_LIMIT = 3540
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
CELERYBEAT_MAX_LOOP_INTERVAL = 60
# Any ANSIBLE_* settings will be passed to the subprocess environment by the
# celery task.
# Do not want AWX to ask interactive questions and want it to be friendly with
# reprovisioning
ANSIBLE_HOST_KEY_CHECKING = False
# RHEL has too old of an SSH so ansible will select paramiko and this is VERY
# .slow
ANSIBLE_PARAMIKO_RECORD_HOST_KEYS = False
# Additional environment variables to be passed to the subprocess started by
# the celery task.
AWX_TASK_ENV = {}
if 'devserver' in INSTALLED_APPS:
INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT
else:

View File

@@ -105,3 +105,7 @@ LOGGING['handlers']['syslog'] = {
# 'filename': os.path.join(BASE_DIR, 'awx.log'),
# 'formatter': 'simple',
#}
# Define additional environment variables to be passed to subprocess started by
# the celery task.
#AWX_TASK_ENV['FOO'] = 'BAR'