mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 08:57:35 -02:30
Merge pull request #2713 from AlanCoding/system_env_vars
Minor cleanup of task environment vars Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -1208,8 +1208,6 @@ class RunJob(BaseTask):
|
|||||||
if job.project:
|
if job.project:
|
||||||
env['PROJECT_REVISION'] = job.project.scm_revision
|
env['PROJECT_REVISION'] = job.project.scm_revision
|
||||||
env['ANSIBLE_RETRY_FILES_ENABLED'] = "False"
|
env['ANSIBLE_RETRY_FILES_ENABLED'] = "False"
|
||||||
env['ANSIBLE_INVENTORY_ENABLED'] = 'script'
|
|
||||||
env['ANSIBLE_INVENTORY_UNPARSED_FAILED'] = 'True'
|
|
||||||
env['MAX_EVENT_RES'] = str(settings.MAX_EVENT_RES_DATA)
|
env['MAX_EVENT_RES'] = str(settings.MAX_EVENT_RES_DATA)
|
||||||
if not kwargs.get('isolated'):
|
if not kwargs.get('isolated'):
|
||||||
env['ANSIBLE_CALLBACK_PLUGINS'] = plugin_path
|
env['ANSIBLE_CALLBACK_PLUGINS'] = plugin_path
|
||||||
@@ -1224,9 +1222,6 @@ class RunJob(BaseTask):
|
|||||||
os.mkdir(cp_dir, 0o700)
|
os.mkdir(cp_dir, 0o700)
|
||||||
env['ANSIBLE_SSH_CONTROL_PATH_DIR'] = cp_dir
|
env['ANSIBLE_SSH_CONTROL_PATH_DIR'] = cp_dir
|
||||||
|
|
||||||
# Allow the inventory script to include host variables inline via ['_meta']['hostvars'].
|
|
||||||
env['INVENTORY_HOSTVARS'] = str(True)
|
|
||||||
|
|
||||||
# Set environment variables for cloud credentials.
|
# Set environment variables for cloud credentials.
|
||||||
cred_files = kwargs.get('private_data_files', {}).get('credentials', {})
|
cred_files = kwargs.get('private_data_files', {}).get('credentials', {})
|
||||||
for cloud_cred in job.cloud_credentials:
|
for cloud_cred in job.cloud_credentials:
|
||||||
|
|||||||
@@ -606,6 +606,9 @@ ANSIBLE_PARAMIKO_RECORD_HOST_KEYS = False
|
|||||||
# output
|
# output
|
||||||
ANSIBLE_FORCE_COLOR = True
|
ANSIBLE_FORCE_COLOR = True
|
||||||
|
|
||||||
|
# If tmp generated inventory parsing fails (error state), fail playbook fast
|
||||||
|
ANSIBLE_INVENTORY_UNPARSED_FAILED = True
|
||||||
|
|
||||||
# Additional environment variables to be passed to the ansible subprocesses
|
# Additional environment variables to be passed to the ansible subprocesses
|
||||||
AWX_TASK_ENV = {}
|
AWX_TASK_ENV = {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user