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
pull/22855/head
Peter Sprygada 8 years ago committed by GitHub
parent 9810429f5b
commit cda3e001c6

@ -57,6 +57,8 @@ class ActionModule(_ActionModule):
pc = copy.deepcopy(self._play_context) pc = copy.deepcopy(self._play_context)
pc.network_os = 'junos' pc.network_os = 'junos'
pc.remote_addr = provider['host'] or self._play_context.remote_addr
if self._task.action == 'junos_netconf': if self._task.action == 'junos_netconf':
pc.connection = 'network_cli' pc.connection = 'network_cli'
pc.port = provider['port'] or self._play_context.port or 22 pc.port = provider['port'] or self._play_context.port or 22

Loading…
Cancel
Save