Merge pull request #17 from ansible/devel

Rebase
This commit is contained in:
Sean Sullivan
2020-10-19 15:56:04 -05:00
committed by GitHub
43 changed files with 495 additions and 635 deletions

View File

@@ -107,17 +107,16 @@ def main():
interval = module.params.get('interval')
timeout = module.params.get('timeout')
lookup_data = {'name': inventory}
lookup_data = {}
if organization:
lookup_data['organization'] = module.resolve_name_to_id('organizations', organization)
inventory_object = module.get_one('inventories', data=lookup_data)
inventory_object = module.get_one('inventories', name_or_id=inventory, data=lookup_data)
if not inventory_object:
module.fail_json(msg='The specified inventory, {0}, was not found.'.format(lookup_data))
inventory_source_object = module.get_one('inventory_sources', **{
inventory_source_object = module.get_one('inventory_sources', name_or_id=inventory_source, **{
'data': {
'name': inventory_source,
'inventory': inventory_object['id'],
}
})

View File

@@ -436,7 +436,7 @@ def main():
'become_enabled', 'diff_mode', 'allow_simultaneous', 'custom_virtualenv', 'job_slice_count', 'webhook_service',
):
field_val = module.params.get(field_name)
if field_val:
if field_val is not None:
new_fields[field_name] = field_val
# Special treatment of extra_vars parameter