diff options
author | Peter Sprygada <privateip@users.noreply.github.com> | 2017-02-14 18:42:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 18:42:15 -0500 |
commit | 8e4f0ec162ecdd4b8fdfbb581e2daac2014922dc (patch) | |
tree | 128582deb6c02ad8ab704af6d6d469fc500d975b /lib/ansible/plugins | |
parent | 6fc989a90207697c17defc775223b8acf9d87058 (diff) | |
download | ansible-8e4f0ec162ecdd4b8fdfbb581e2daac2014922dc.tar.gz |
checks connection type is local and fails if not in eos (#21429)
Diffstat (limited to 'lib/ansible/plugins')
-rw-r--r-- | lib/ansible/plugins/action/eos.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ansible/plugins/action/eos.py b/lib/ansible/plugins/action/eos.py index 896e53a655..9b6d1484bb 100644 --- a/lib/ansible/plugins/action/eos.py +++ b/lib/ansible/plugins/action/eos.py @@ -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'] |