mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes issue that caused eapi transport setting to get lost (#21919)
The eos action didn't properly set provider transport argument for the module. This patch fixes that problem
This commit is contained in:
parent
01ac1bc6e5
commit
f9b108e319
2 changed files with 4 additions and 3 deletions
|
@ -79,9 +79,9 @@ def get_connection(module):
|
||||||
global _DEVICE_CONNECTION
|
global _DEVICE_CONNECTION
|
||||||
if not _DEVICE_CONNECTION:
|
if not _DEVICE_CONNECTION:
|
||||||
load_params(module)
|
load_params(module)
|
||||||
if 'transport' not in module.params:
|
transport = module.params['transport']
|
||||||
conn = Cli(module)
|
provider_transport = (module.params['provider'] or {}).get('transport')
|
||||||
elif module.params['transport'] == 'eapi':
|
if 'eapi' in (transport, provider_transport):
|
||||||
conn = Eapi(module)
|
conn = Eapi(module)
|
||||||
else:
|
else:
|
||||||
conn = Cli(module)
|
conn = Cli(module)
|
||||||
|
|
|
@ -87,6 +87,7 @@ class ActionModule(_ActionModule):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
provider_arg = {
|
provider_arg = {
|
||||||
|
'transport': 'eapi',
|
||||||
'host': provider.get('host') or self._play_context.remote_addr,
|
'host': provider.get('host') or self._play_context.remote_addr,
|
||||||
'port': provider.get('port'),
|
'port': provider.get('port'),
|
||||||
'username': provider.get('username') or self._play_context.connection_user,
|
'username': provider.get('username') or self._play_context.connection_user,
|
||||||
|
|
Loading…
Reference in a new issue