# Proposal: rename sudo\_user to sudo\_to

**URL:** <https://forum.ansible.com/t/proposal-rename-sudo-user-to-sudo-to/11743>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [July 31, 2012, 6:38pm UTC](https://forum.ansible.com/t/proposal-rename-sudo-user-to-sudo-to/11743 "2012-07-31T18:38:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorin\_Hochstein1](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@Lorin\_Hochstein1](https://forum.ansible.com/u/Lorin_Hochstein1)\
**Post date:** [July 31, 2012, 6:38pm UTC](https://forum.ansible.com/t/proposal-rename-sudo-user-to-sudo-to/11743/1 "2012-07-31T18:38:34Z")

</div>

Coming from Ubuntu-land where the root account has ssh disabled, I think of the “sudo user” as the user that has sudo privileges. However, Ansible uses “sudo\_user” to mean “user to sudo to”.

What do people think of the idea of using “sudo\_to” or “sudo\_as” instead of “sudo\_user”, to make this more explicit? “sudo\_user” could still be an alias.

Lorin

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 31, 2012, 6:51pm UTC](https://forum.ansible.com/t/proposal-rename-sudo-user-to-sudo-to/11743/2 "2012-07-31T18:51:51Z")

</div>

Sounds good.

Send me a patch that also changes all the examples in examples/playbooks, but doesn’t change the variable names (API compatibility is important), and I’ll take it.

I think it should have also be true that if you set sudo\_user/sudo\_to you auto-engage sudo, though we can’t really do that without breaking some meaning we’ve established around the environment variables and defaults, and am unwilling to change that.

It probably SHOULD be an error in play.py to set sudo\_user and not set “sudo”, because the user basically made a typo in that case.

–Michael

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 31, 2012, 9:26pm UTC](https://forum.ansible.com/t/proposal-rename-sudo-user-to-sudo-to/11743/3 "2012-07-31T21:26:14Z")

</div>

Thinking about this some more…

The command line happens to take --sudo-user now, so I don’t think we should change that in Ansible.

I am generally thinking aliases are confusing to different users who share playbooks with one another, so we should probably not change this.
