ansible/ansible — pull request #5751 by angstwad (2014-01-24 17:32:34+00:00)
Title: Fix su bug where connecting as root would not allow su to another user

Hi guys,

This resolves the su issue as reported on the ansible-project mailing list. The following playbook verifies the bug and the resolution with the patch.

```
- name: Test su connecting as root
hosts: test
gather_facts: no
remote_user: root
tasks:
- name: Test connecting as root
command: /usr/bin/whoami

- name: Connect as root and su to testuser
command: /usr/bin/whoami
su: yes
su_user: testuser
```
Tests are passing.
```
----------------------------------------------------------------------
Ran 96 tests in 27.138s

OK (SKIP=1)
```