ansible/ansible — pull request #5244 by angstwad (2013-12-10 22:30:37+00:00)
Title: Proposing fix for Issue #4324; adding support for su

For Issue #4324, this adds support for `su`.

* add su support to `bin/ansible`
* su support added into the `runner.Runner` class
* ssh conn plugin updated to allow su-able commands
* necessary helper functions added into ansible.utils module
* add su support to `bin/ansible-playbook` and
* add relevant su support to playbook code in lib
* resolve issues where remote /tmp dir has improper permissions; ensure chmod issues are handled in situations where the su user is not root

Tests ran ok:
```
Ran 93 tests in 41.325s

OK (SKIP=1)
```

**The glaring omission here is lack of hostvars support**. This does not incorporate su-ing via hostvars. Basically, I'm soliciting feedback on this -- like, should we implement this support and how...or is this even the right direction to take for adding su support in Ansible. Perhaps you know what I mean.

Hey, did you guys know that the Ansible codebase is complex and has tons of stuff going on? Of course you did! But I didn't, not until I worked on su, so here's hoping my proposed PR here is good enough. ;) Thanks, dudes.