Filter out ANSIBLE_BASE from job env var (#6710)

This commit is contained in:
Hao Liu 2024-09-27 15:42:44 -04:00 committed by GitHub
parent 6574cfe3a9
commit 02795c9ed9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -299,7 +299,7 @@ class BaseTask(object):
env = {}
# Add ANSIBLE_* settings to the subprocess environment.
for attr in dir(settings):
if attr == attr.upper() and attr.startswith('ANSIBLE_'):
if attr == attr.upper() and attr.startswith('ANSIBLE_') and not attr.startswith('ANSIBLE_BASE_'):
env[attr] = str(getattr(settings, attr))
# Also set environment variables configured in AWX_TASK_ENV setting.
for key, value in settings.AWX_TASK_ENV.items():