title: ansible become_exe: "sudo su -" adds more paramters (-H -S -n -u user)
body: <p>I have passwordless connection to specific servers. On this server my user can do "sudo su - user"</p>
  
  <pre><code>&gt; $ ssh host
  
  myuser@host:~ $ sudo su - new_user
  new_user@host:~ $
  </code></pre>
  
  <p>I want to achieve this same with Ansible playbook.</p>
  
  <pre><code>---
  
  - hosts: my_group
    remote_user: myuser
    tasks:
            - name: "whoami"
              become: yes
              become_exe: "sudo su -"
              become_method: sudo
              become_user: "new_user"
              command: whoami
              register: result
            - debug: msg="{{ result.stdout }}"
  </code></pre>
  
  <p><strong>When I run playbook:</strong></p>
  
  <pre><code>&gt; user / ansib $ ansible-playbook int.yaml
  
  PLAY [int] ********************************************************************************************************************************************************
  
  TASK [Gathering Facts] ********************************************************************************************************************************************
  ok: [host]
  
  TASK [who am i] ***************************************************************************************************************************************************
  fatal: [host]: FAILED! =&gt; {"msg": "Timeout (12s) waiting for privilege escalation prompt: "}
  
  PLAY RECAP ********************************************************************************************************************************************************
  host                 : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
  
  </code></pre>
  
  <p><strong>Debug:</strong></p>
  
  <pre><code>TASK [who am i] ***************************************************************************************************************************************************
  task path: /login/myuser/ansib/cert.yaml:10
  &lt;host&gt; ESTABLISH SSH CONNECTION FOR USER: myuser
  &lt;host&gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/login/myuser/.ansible/cp/0dd1c5b064 host '/bin/sh -c '"'"'echo ~myuser &amp;&amp; sleep 0'"'"''
  &lt;host&gt; (0, '/home/myuser\n', '')
  &lt;host&gt; ESTABLISH SSH CONNECTION FOR USER: myuser
  &lt;host&gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/login/myuser/.ansible/cp/0dd1c5b064 host '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo /var/tmp `"&amp;&amp; mkdir /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022 &amp;&amp; echo ansible-tmp-1588766128.54-31125-82317805935022="` echo /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022 `" ) &amp;&amp; sleep 0'"'"''
  &lt;host&gt; (0, 'ansible-tmp-1588766128.54-31125-82317805935022=/var/tmp/ansible-tmp-1588766128.54-31125-82317805935022\n', '')
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/commands/command.py
  &lt;host&gt; PUT /login/myuser/.ansible/tmp/ansible-local-31097VQMw2J/tmpwKIGsv TO /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022/AnsiballZ_command.py
  &lt;host&gt; SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/login/myuser/.ansible/cp/0dd1c5b064 '[host]'
  &lt;host&gt; (0, 'sftp&gt; put /login/myuser/.ansible/tmp/ansible-local-31097VQMw2J/tmpwKIGsv /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022/AnsiballZ_command.py\n', '')
  &lt;host&gt; ESTABLISH SSH CONNECTION FOR USER: myuser
  &lt;host&gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/login/myuser/.ansible/cp/0dd1c5b064 host '/bin/sh -c '"'"'setfacl -m u:new_user:r-x /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022/ /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022/AnsiballZ_command.py &amp;&amp; sleep 0'"'"''
  &lt;host&gt; (0, '', '')
  &lt;host&gt; ESTABLISH SSH CONNECTION FOR USER: myuser
  &lt;host&gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/login/myuser/.ansible/cp/0dd1c5b064 -tt host '/bin/sh -c '"'"'sudo su - -H -S -n  -u new_user /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-udwnqqirghwxmfmdebilbiitxqeurmzg ; /usr/bin/python /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022/AnsiballZ_command.py'"'"'"'"'"'"'"'"' &amp;&amp; sleep 0'"'"''
  &lt;host&gt; ESTABLISH SSH CONNECTION FOR USER: myuser
  &lt;host&gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/login/myuser/.ansible/cp/0dd1c5b064 host '/bin/sh -c '"'"'rm -f -r /var/tmp/ansible-tmp-1588766128.54-31125-82317805935022/ &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"''
  &lt;host&gt; (0, '', '')
  
  </code></pre>
  
  <p>This line:</p>
  
  <pre><code>sudo su - -H -S -n  -u new_user /bin/sh -c
  </code></pre>
  
  <p>And of course if I run this command by my own I do also have password prompt.</p>
  
  <p>I have also tried to move some things around and I've changed my playbook and I've added also become_flags parameter:</p>
  
  <pre><code>---
  
  - hosts: my_group
    remote_user: myuser
    tasks:
            - name: "whoami"
              become: yes
              become_exe: "sudo su -"
              become_method: sudo
              become_user: "new_user"
              become_flags: ""
              command: whoami
              register: result
            - debug: msg="{{ result.stdout }}"
  
  </code></pre>
  
  <p>and it's a bit better...</p>
  
  <pre><code>sudo su -  new_user -c 
  </code></pre>
  
  <p>Unfortunately adding "-c" keeps asking me for password...</p>
  
  <p>Any idea if I can somehow become as new_user without "-c" parameter, or run command as new_user?</p>