mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes issue when host is defined in provider for junos (#22918)
The junos action handler was not honoring the host value in the provider argument. This patch will now use the provider host entry if it exists and falls back to the inventory hostname
This commit is contained in:
parent
9810429f5b
commit
cda3e001c6
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ class ActionModule(_ActionModule):
|
|||
pc = copy.deepcopy(self._play_context)
|
||||
pc.network_os = 'junos'
|
||||
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
|
||||
if self._task.action == 'junos_netconf':
|
||||
pc.connection = 'network_cli'
|
||||
pc.port = provider['port'] or self._play_context.port or 22
|
||||
|
|
Loading…
Reference in a new issue