# Question: ERROR! 'become\_user' is not a valid attribute for a TaskInclude

**URL:** <https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383>\
**Category:** Ansible Project\
**Created:** [May 21, 2019, 2:35pm UTC](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383 "2019-05-21T14:35:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav\_Arora](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gaurav\_Arora](https://forum.ansible.com/u/Gaurav_Arora)\
**Post date:** [May 21, 2019, 2:35pm UTC](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383/1 "2019-05-21T14:35:37Z")

</div>

Hi  
We are upgrading from Ansible 2.7 to Ansible 2.8. We have following lines which are working perfectly fine with Ansible 2.7

**# tasks file for \*\*\*\***  
**- name: Call \*\*\*\* installation tasks for {{ ansible\_distribution|upper }}**  
**include\_tasks: “{{ ansible\_distribution|lower }}\_\*\*\*\*\_install.yaml”**  
**become\_user: root**

But when we run it with Ansible2.8, we get the following error:  
**ERROR! ‘become\_user’ is not a valid attribute for a TaskInclude**

We checked the change logs but did not find anything related to this. Can anyone help us out here?

Thank You

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [May 21, 2019, 2:38pm UTC](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383/2 "2019-05-21T14:38:27Z")

</div>

In Ansible 2.7 we silently ignored `become_user` on `include_tasks`, so it wasn’t actually doing anything for you.

Arguments applied to `include_tasks` only affect the include and not the tasks within, and become does nothing in that situation.

I believe what you want, is the functionality that `apply` gives you.

- name: Call \*\*\*\* installation tasks for {{ ansible\_distribution|upper }}  
include\_tasks: “{{ ansible\_distribution|lower }}\_\*\*\*\*\_install.yaml”  
args:  
apply:  
become\_user: root

Also, note that `become_user` defaults to `root`.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Arora](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gaurav\_Arora](https://forum.ansible.com/u/Gaurav_Arora)\
**Post date:** [May 21, 2019, 3:05pm UTC](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383/3 "2019-05-21T15:05:04Z")

</div>

Thanks a lot Matt for guiding towards the correct solution. 🙂
