mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
Custom inventory script environment variable blacklist
This commit is contained in:
@@ -1052,7 +1052,7 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
pass
|
pass
|
||||||
elif inventory_update.source == 'custom':
|
elif inventory_update.source == 'custom':
|
||||||
for env_k in inventory_update.source_vars_dict:
|
for env_k in inventory_update.source_vars_dict:
|
||||||
if str(env_k) not in os.environ:
|
if str(env_k) not in os.environ and str(env_k) not in settings.INV_ENV_VARIABLE_BLACKLIST:
|
||||||
env[str(env_k)] = unicode(inventory_update.source_vars_dict[env_k])
|
env[str(env_k)] = unicode(inventory_update.source_vars_dict[env_k])
|
||||||
return env
|
return env
|
||||||
|
|
||||||
|
|||||||
@@ -351,6 +351,8 @@ RAX_GROUP_FILTER = r'^(?!instance-.+).+$'
|
|||||||
RAX_HOST_FILTER = r'^.+$'
|
RAX_HOST_FILTER = r'^.+$'
|
||||||
RAX_EXCLUDE_EMPTY_GROUPS = True
|
RAX_EXCLUDE_EMPTY_GROUPS = True
|
||||||
|
|
||||||
|
INV_ENV_VARIABLE_BLACKLIST = ("HOME", "_")
|
||||||
|
|
||||||
# ----------------
|
# ----------------
|
||||||
# -- Amazon EC2 --
|
# -- Amazon EC2 --
|
||||||
# ----------------
|
# ----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user