Fix issue on nxos modules when transport is passed via provider (#22488)
The nxos modules read the task level transport variable, thus if the user pass it via provider the all fail with an UnboundLocalError. Fixes #22355
This commit is contained in:
parent
0433be33bd
commit
9173a7727c
1 changed files with 1 additions and 4 deletions
|
@ -99,10 +99,7 @@ class ActionModule(_ActionModule):
|
|||
self._task.args['provider'] = provider_arg
|
||||
|
||||
# make sure a transport value is set in args
|
||||
transport = self._task.args.get('transport')
|
||||
provider_transport = (self._task.args.get('provider') or {}).get('transport')
|
||||
if all((transport is None, provider_transport is None)):
|
||||
self._task.args['transport'] = 'cli'
|
||||
self._task.args['transport'] = transport
|
||||
|
||||
return super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
|
|
Loading…
Reference in a new issue