From 8bccd0830be8f2c64bfe2c6828111f5b5d6d8c94 Mon Sep 17 00:00:00 2001 From: Tim Rupp Date: Fri, 1 Jun 2018 08:55:50 -0700 Subject: [PATCH] Re-allow SSH due to broken delegation (#40978) Removes the SSH enforcement because it breaks situations where, for example, an admin maintains Ansible Tower and another team needs to use Ansible with the BIG-IP modules, but the Tower admin does not want to install the F5-SDK on the Ansible Tower instance. In this situation, the user needs to delegate the execution of the BIG-IP module to another linux host that does have the dependencies installed. Usually this is done with delegation, often over SSH. Limiting the SSH connection here prevents this from working. --- lib/ansible/plugins/action/bigip.py | 2 -- lib/ansible/plugins/action/bigiq.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/ansible/plugins/action/bigip.py b/lib/ansible/plugins/action/bigip.py index 516023a052..8aecb6231b 100644 --- a/lib/ansible/plugins/action/bigip.py +++ b/lib/ansible/plugins/action/bigip.py @@ -80,8 +80,6 @@ class ActionModule(_ActionModule): } task_vars['ansible_socket'] = socket_path - else: - return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection} if (self._play_context.connection == 'local' and transport == 'cli') or self._play_context.connection == 'network_cli': # make sure we are in the right cli context which should be diff --git a/lib/ansible/plugins/action/bigiq.py b/lib/ansible/plugins/action/bigiq.py index 402044c9a9..b962edaa77 100644 --- a/lib/ansible/plugins/action/bigiq.py +++ b/lib/ansible/plugins/action/bigiq.py @@ -78,8 +78,6 @@ class ActionModule(_ActionModule): 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'} task_vars['ansible_socket'] = socket_path - else: - return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection} if (self._play_context.connection == 'local' and transport == 'cli') or self._play_context.connection == 'network_cli': # make sure we are in the right cli context which should be