diff --git a/lib/ansible/module_utils/network/f5/bigiq.py b/lib/ansible/module_utils/network/f5/bigiq.py index 02254886db..fbae3a676b 100644 --- a/lib/ansible/module_utils/network/f5/bigiq.py +++ b/lib/ansible/module_utils/network/f5/bigiq.py @@ -62,7 +62,9 @@ class F5Client(F5BaseClient): class F5RestClient(F5BaseClient): def __init__(self, *args, **kwargs): - super(F5RestClient, self).__init__(*args, **kwargs) + params = kwargs.get('module').params + module = kwargs.pop('module') + super(F5RestClient, self).__init__(module=module, **params) self.provider = self.merge_provider_params() @property diff --git a/lib/ansible/module_utils/network/f5/common.py b/lib/ansible/module_utils/network/f5/common.py index 5d7f104b21..c4369541da 100644 --- a/lib/ansible/module_utils/network/f5/common.py +++ b/lib/ansible/module_utils/network/f5/common.py @@ -434,7 +434,7 @@ class F5BaseClient(object): elif os.environ.get('ANSIBLE_NET_USERNAME', None): result['user'] = os.environ.get('ANSIBLE_NET_USERNAME', None) else: - result['user'] = True + result['user'] = None if provider.get('password', None): result['password'] = provider.get('password', None) @@ -445,7 +445,7 @@ class F5BaseClient(object): elif os.environ.get('ANSIBLE_NET_PASSWORD', None): result['password'] = os.environ.get('ANSIBLE_NET_PASSWORD', None) else: - result['password'] = True + result['password'] = None if result['validate_certs'] in BOOLEANS_TRUE: result['validate_certs'] = True diff --git a/lib/ansible/plugins/action/bigip.py b/lib/ansible/plugins/action/bigip.py index a8e94d143a..516023a052 100644 --- a/lib/ansible/plugins/action/bigip.py +++ b/lib/ansible/plugins/action/bigip.py @@ -73,9 +73,11 @@ class ActionModule(_ActionModule): socket_path = connection.run() display.vvvv('socket_path: %s' % socket_path, pc.remote_addr) if not socket_path: - return {'failed': True, - 'msg': 'Unable to open shell. Please see: ' + - 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'} + return { + 'failed': True, + 'msg': 'Unable to open shell. Please see: ' + 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell' + } task_vars['ansible_socket'] = socket_path else: diff --git a/lib/ansible/plugins/action/bigiq.py b/lib/ansible/plugins/action/bigiq.py index ddd09c5b33..402044c9a9 100644 --- a/lib/ansible/plugins/action/bigiq.py +++ b/lib/ansible/plugins/action/bigiq.py @@ -74,7 +74,7 @@ class ActionModule(_ActionModule): display.vvvv('socket_path: %s' % socket_path, pc.remote_addr) if not socket_path: return {'failed': True, - 'msg': 'unable to open shell. Please see: ' + + 'msg': 'Unable to open shell. Please see: ' 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'} task_vars['ansible_socket'] = socket_path diff --git a/lib/ansible/plugins/terminal/bigip.py b/lib/ansible/plugins/terminal/bigip.py index 71ffe81977..d810659e15 100644 --- a/lib/ansible/plugins/terminal/bigip.py +++ b/lib/ansible/plugins/terminal/bigip.py @@ -51,10 +51,12 @@ class TerminalModule(TerminalBase): def on_open_shell(self): try: self._exec_cli_command(b'modify cli preference display-threshold 0 pager disabled') + self._exec_cli_command(b'run /util bash -c "stty cols 1000000" 2> /dev/null') except AnsibleConnectionFailure as ex: output = str(ex) if 'modify: command not found' in output: try: self._exec_cli_command(b'tmsh modify cli preference display-threshold 0 pager disabled') + self._exec_cli_command(b'stty cols 1000000 2> /dev/null') except AnsibleConnectionFailure as ex: raise AnsibleConnectionFailure('unable to set terminal parameters')