1
0
Fork 0
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:
Peter Sprygada 2017-02-14 18:42:15 -05:00 committed by GitHub
parent 6fc989a902
commit 8e4f0ec162

View file

@ -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']