mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
checks connection type is local and fails if not in eos (#21429)
This commit is contained in:
parent
6fc989a902
commit
8e4f0ec162
1 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,12 @@ from ansible.module_utils._text import to_bytes
|
|||
class ActionModule(_ActionModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
if self._play_context.connection != 'local':
|
||||
return dict(
|
||||
fail=True,
|
||||
msg='invalid connection specified, expected connection=local, '
|
||||
'got %s' % self._play_context.connection
|
||||
)
|
||||
|
||||
provider = self.load_provider()
|
||||
transport = provider['transport']
|
||||
|
|
Loading…
Reference in a new issue