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:
parent
a0c0076cfb
commit
c9e6da338c
1 changed files with 20 additions and 26 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue