ipagroup: Fix changed flag, new test cases

The changed flag returned by ipagroup calls have not been correct. This
change fixes this. Addtitionally new test cases have been added to make
sure that the changed flag is correct.
This commit is contained in:
Thomas Woerner
2019-10-30 16:22:27 +01:00
parent 6e6e193ab2
commit ff9ce6b86a
2 changed files with 179 additions and 1 deletions

View File

@@ -378,7 +378,10 @@ def main():
try:
result = api_command(ansible_module, command, to_text(name),
args)
if "completed" in result and result["completed"] > 0:
if "completed" in result:
if result["completed"] > 0:
changed = True
else:
changed = True
except Exception as e:
ansible_module.fail_json(msg="%s: %s: %s" % (command, name,