1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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
This commit is contained in:
Peter Sprygada 2017-11-12 19:57:04 -05:00 committed by GitHub
parent a0c0076cfb
commit c9e6da338c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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