fixes eos connection checks and checks configured connection (#32828)

This change will check the configured connection first and then check
the local provider values.
pull/32870/head
Peter Sprygada 7 years ago committed by Nathaniel Case
parent b9bdb05459
commit db6a72ebf9

@ -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…
Cancel
Save