mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-31 15:53:09 +00:00
[PR #10459/ee783066 backport][stable-11] Fix ansible-core 2.19 deprecations (#10471)
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:
@@ -103,7 +103,6 @@ def syspatch_run(module):
|
||||
cmd = module.get_bin_path('syspatch', True)
|
||||
changed = False
|
||||
reboot_needed = False
|
||||
warnings = []
|
||||
|
||||
# Set safe defaults for run_flag and check_flag
|
||||
run_flag = ['-c']
|
||||
@@ -145,11 +144,11 @@ def syspatch_run(module):
|
||||
# Kernel update applied
|
||||
reboot_needed = True
|
||||
elif out.lower().find('syspatch updated itself') >= 0:
|
||||
warnings.append('Syspatch was updated. Please run syspatch again.')
|
||||
module.warn('Syspatch was updated. Please run syspatch again.')
|
||||
|
||||
# If no stdout, then warn user
|
||||
if len(out) == 0:
|
||||
warnings.append('syspatch had suggested changes, but stdout was empty.')
|
||||
module.warn('syspatch had suggested changes, but stdout was empty.')
|
||||
|
||||
changed = True
|
||||
else:
|
||||
@@ -161,7 +160,6 @@ def syspatch_run(module):
|
||||
rc=rc,
|
||||
stderr=err,
|
||||
stdout=out,
|
||||
warnings=warnings
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user