Make non-required params actually optional, fix idempotency issues

This commit is contained in:
beeankha
2020-02-25 23:51:26 -05:00
parent 1c4042340c
commit b532012748
8 changed files with 24 additions and 16 deletions

View File

@@ -209,11 +209,11 @@ def main():
}
# Attempt to look up the related items the user specified (these will fail the module if not found)
if credential:
if credential is not None:
inventory_source_fields['credential'] = module.resolve_name_to_id('credentials', credential)
if source_project:
if source_project is not None:
inventory_source_fields['source_project'] = module.resolve_name_to_id('projects', source_project)
if source_script:
if source_script is not None:
inventory_source_fields['source_script'] = module.resolve_name_to_id('inventory_scripts', source_script)
OPTIONAL_VARS = (