# privilege escalation refactoring

**URL:** <https://forum.ansible.com/t/privilege-escalation-refactoring/17693>\
**Category:** Ansible Developer\
**Created:** [March 8, 2015, 12:16am UTC](https://forum.ansible.com/t/privilege-escalation-refactoring/17693 "2015-03-08T00:16:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 8, 2015, 12:16am UTC](https://forum.ansible.com/t/privilege-escalation-refactoring/17693/1 "2015-03-08T00:16:57Z")

</div>

Hi,  
I just pushed out [https://github.com/ansible/ansible/pull/10411](https://github.com/ansible/ansible/pull/10411), which  
does a major refactor of sudo/su and adds pbrun (powerbroker) and  
pfexec to the mix.

I hope to not break existing playbooks and at the same time make it  
much easier to add new systems to become other users. The new system  
uses 'become' as a keyword where before you used sudo or su.  
become\_method being the one deciding which privilege escalation to use  
(default is sudo).

kick the tires, I expect plenty of things to break or not work as  
expected, part of this change is simplifying the very convoluted code  
we had and normalizing options as in many cases we had 2 and 3  
implementations of the same thing. I specially expect issues with  
method exe and flags as they did not seem to be implemented for  
anything other than sudo.
