mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-07-28 18:34:48 +00:00
Merge pull request #55 from maxamillion/issues/37/authorized_key-check_mode-inconsistent-return
authorized_keys - consistent behavior in check_mode Reviewed-by: https://github.com/apps/ansible-zuul
This commit is contained in:
@@ -635,13 +635,9 @@ def enforce_state(module, params):
|
||||
}
|
||||
params['diff'] = diff
|
||||
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True, diff=diff)
|
||||
writefile(module, filename, new_content)
|
||||
if not module.check_mode:
|
||||
writefile(module, filename, new_content)
|
||||
params['changed'] = True
|
||||
else:
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=False)
|
||||
|
||||
return params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user