Make it so that we take source_vars with the custom inventory script

when defining the inventory source.  Slight modification to the UI to
make that possible
This commit is contained in:
Matthew Jones
2014-10-14 15:38:42 -04:00
parent 8b8fb2403c
commit c43a7be99e
3 changed files with 9 additions and 5 deletions

View File

@@ -1044,6 +1044,10 @@ class RunInventoryUpdate(BaseTask):
elif inventory_update.source == 'file':
# FIXME: Parse source_env to dict, update env.
pass
elif inventory_update.source == 'custom':
for env_k in inventory_update.source_vars_dict:
if env_k not in os.environ:
env[env_k] = inventory_update.source_vars_dict[env_k]
return env
def build_args(self, inventory_update, **kwargs):