mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
added warnings list to module and autoadd
added better way of adding warnings to return data backwards compatible if warnings key already exists added deprecations made iface more generic changed to enforce type per item added logging of warnings/deprecations also display deprecations by default
This commit is contained in:
@@ -99,9 +99,13 @@ class CallbackBase:
|
||||
|
||||
def _handle_warnings(self, res):
|
||||
''' display warnings, if enabled and any exist in the result '''
|
||||
if C.COMMAND_WARNINGS and 'warnings' in res and res['warnings']:
|
||||
for warning in res['warnings']:
|
||||
self._display.warning(warning)
|
||||
if C.COMMAND_WARNINGS:
|
||||
if 'warnings' in res and res['warnings']:
|
||||
for warning in res['warnings']:
|
||||
self._display.warning(warning)
|
||||
if 'deprecations' in res and res['deprecations']:
|
||||
for warning in res['deprecations']:
|
||||
self._display.deprecated(warning)
|
||||
|
||||
def _get_diff(self, difflist):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user