# using become in one tasks of a role

**URL:** <https://forum.ansible.com/t/using-become-in-one-tasks-of-a-role/29456>\
**Category:** AWX Project\
**Tags:** windows, awx\
**Created:** [January 17, 2019, 12:45pm UTC](https://forum.ansible.com/t/using-become-in-one-tasks-of-a-role/29456 "2019-01-17T12:45:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Turovsky](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@Igor\_Turovsky](https://forum.ansible.com/u/Igor_Turovsky)\
**Post date:** [January 17, 2019, 12:45pm UTC](https://forum.ansible.com/t/using-become-in-one-tasks-of-a-role/29456/1 "2019-01-17T12:45:31Z")

</div>

Hello,

In my playbook I am using become for one tasks only, i.e.:

`

- name: Create ECP Virtual Directory  
`  
exch\_ecp\_virtualdirectory:  
identity: ‘{{ ansible\_hostname }}\ecp ({{ site }})’  
path: ‘{{ folder }}\ecp’  
state: present  
role: ClientAccess  
ECPproperties:  
AdfsAuthentication: true  
BasicAuthentication: false  
DigestAuthentication: false  
FormsAuthentication: false  
WindowsAuthentication: false  
AdminEnabled: false  
InternalUrl: null  
ExternalUrl: null  
vars:  
ansible\_become: yes  
ansible\_become\_method: runas  
ansible\_become\_user: "{{ exchange\_admin\_user }}

The playbook is used to configure MS Exchange and become is used to get rid of double hop authentication issue.  
When I using it with Ansible, I log on ansible host, receive kerberos ticket for my account and run ansible-playbook with --ask-become-pass.  
What is the best way to implement the same scenario in AWX? i.e. I have machine credentials which I associate with Job template and AWX/Ansible will use them to receive kerberos ticket, connect to Windows nodes and run most of the tasks. But how can I provide the credentials for this task which uses become within AWX? If I specify parameters of Privilege Escalation Method for machine credentials will the be applied for the all tasks or just this one which explicitly uses become ?

I want to avoid using Ansible valult in this case.

Thank you.
