fixes eos connection checks and checks configured connection (#32828)
This change will check the configured connection first and then check the local provider values.
This commit is contained in:
parent
b9bdb05459
commit
db6a72ebf9
1 changed files with 22 additions and 21 deletions
|
@ -37,13 +37,14 @@ except ImportError:
|
|||
class ActionModule(_ActionModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
|
||||
if self._play_context.connection == 'local':
|
||||
provider = load_provider(eos_provider_spec, self._task.args)
|
||||
transport = provider['transport'] or 'cli'
|
||||
|
||||
display.vvvv('connection transport is %s' % transport, self._play_context.remote_addr)
|
||||
|
||||
if transport == 'cli':
|
||||
if self._play_context.connection == 'local':
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'eos'
|
||||
|
|
Loading…
Reference in a new issue