Magic Modules changes. (#97)

Ensure that Ansible always returns full resource after update + no op
This commit is contained in:
The Magician 2018-09-24 10:46:28 -07:00 committed by Alex Stephen
parent a53ccea09f
commit 6aa571c1b8
43 changed files with 31 additions and 105 deletions

View file

@ -278,7 +278,8 @@ def main():
if fetch:
if state == 'present':
if is_different(module, fetch):
fetch = update(module, self_link(module), kind, fetch)
update(module, self_link(module), kind, fetch)
fetch = fetch_resource(module, self_link(module), kind)
changed = True
else:
delete(module, self_link(module), kind)
@ -288,8 +289,6 @@ def main():
if state == 'present':
fetch = create(module, collection(module), kind)
changed = True
else:
fetch = {}
fetch.update({'changed': changed})