update sros local action plugin to support network_cli (#32830)

* update sros local action plugin to support network_cli

This updates the sros local action plugin to only start the connection
if connection=local is specified.  This is to support network_cli
connection plugin

* fix up pep8 issues
pull/32838/head
Peter Sprygada 7 years ago committed by GitHub
parent a0c0076cfb
commit c9e6da338c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,13 +38,7 @@ class ActionModule(_ActionModule):
def run(self, tmp=None, task_vars=None): def run(self, tmp=None, task_vars=None):
if self._play_context.connection != 'local': if self._play_context.connection == 'local':
return dict(
failed=True,
msg='invalid connection specified, expected connection=local, '
'got %s' % self._play_context.connection
)
provider = load_provider(sros_provider_spec, self._task.args) provider = load_provider(sros_provider_spec, self._task.args)
pc = copy.deepcopy(self._play_context) pc = copy.deepcopy(self._play_context)

Loading…
Cancel
Save