Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py
- index 6207e31a05..bb024e240f 100644
- --- a/lib/ansible/plugins/connection/ssh.py
- +++ b/lib/ansible/plugins/connection/ssh.py
- @@ -185,6 +185,15 @@ DOCUMENTATION = '''
- env: [{name: ANSIBLE_SCP_IF_SSH}]
- ini:
- - {key: scp_if_ssh, section: ssh_connection}
- + use_tty:
- + default: True
- + description: add -tt to ssh commands to force tty allocation
- + env: [{name: ANSIBLE_SSH_USETTY}]
- + ini:
- + - {key: usetty, section: ssh_connection}
- + type: boolean
- + vars:
- + - name: ansible_ssh_usetty
- '''
- import errno
- @@ -957,7 +966,7 @@ class Connection(ConnectionBase):
- ssh_executable = self._play_context.ssh_executable
- - if not in_data and sudoable:
- + if not in_data and sudoable and self._options['use_tty']:
- args = (ssh_executable, '-tt', self.host, cmd)
- else:
- args = (ssh_executable, self.host, cmd)
Add Comment
Please, Sign In to add comment