mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
fixes issue where nxos module will fail due to KeyError (#22966)
Updates nxos action handler to handle deleting provider key if exists or silently continuing if a KeyError is raised.
This commit is contained in:
@@ -117,7 +117,11 @@ class ActionModule(_ActionModule):
|
||||
self._task.args['transport'] = transport
|
||||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
del result['invocation']['module_args']['provider']
|
||||
|
||||
try:
|
||||
del result['invocation']['module_args']['provider']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user