mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
[PR #10459/ee783066 backport][stable-10] Fix ansible-core 2.19 deprecations (#10470)
Fix ansible-core 2.19 deprecations (#10459)
Do not return warnings.
(cherry picked from commit ee7830667a)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -241,8 +241,8 @@ def main():
|
||||
(msg, changed) = present(path, username, password, hash_scheme, create, check_mode)
|
||||
elif state == 'absent':
|
||||
if not os.path.exists(path):
|
||||
module.exit_json(msg="%s not present" % username,
|
||||
warnings="%s does not exist" % path, changed=False)
|
||||
module.warn("%s does not exist" % path)
|
||||
module.exit_json(msg="%s not present" % username, changed=False)
|
||||
(msg, changed) = absent(path, username, check_mode)
|
||||
else:
|
||||
module.fail_json(msg="Invalid state: %s" % state)
|
||||
|
||||
Reference in New Issue
Block a user