diff --git a/lib/ansible/module_utils/vultr.py b/lib/ansible/module_utils/vultr.py index e26ae15208..e40d408d73 100644 --- a/lib/ansible/module_utils/vultr.py +++ b/lib/ansible/module_utils/vultr.py @@ -237,6 +237,10 @@ class Vultr: self.module.fail_json(msg="Could not find %s with %s: %s" % (resource, key, value)) def normalize_result(self, resource): + fields_to_remove = set(resource.keys()) - set(self.returns.keys()) + for field in fields_to_remove: + resource.pop(field) + for search_key, config in self.returns.items(): if search_key in resource: if 'convert_to' in config: diff --git a/lib/ansible/modules/cloud/vultr/vultr_startup_script.py b/lib/ansible/modules/cloud/vultr/vultr_startup_script.py index fd94597e9e..95af6a9c57 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_startup_script.py +++ b/lib/ansible/modules/cloud/vultr/vultr_startup_script.py @@ -142,7 +142,7 @@ class AnsibleVultrStartupScript(Vultr): self.returns = { 'SCRIPTID': dict(key='id'), 'type': dict(key='script_type'), - 'name': dict(key='name'), + 'name': dict(), 'script': dict(), 'date_created': dict(), 'date_modified': dict(),