--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c046f49f-d61d-40a9-8668-4d8659ba5ea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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: rootAlso, note that `become_user` defaults to `root`.
On Tue, May 21, 2019 at 9:35 AM Gaurav Arora <gaurava...@gmail.com> wrote:
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: rootBut when we run it with Ansible2.8, we get the following error:ERROR! 'become_user' is not a valid attribute for a TaskIncludeWe checked the change logs but did not find anything related to this. Can anyone help us out here?Thank You
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c046f49f-d61d-40a9-8668-4d8659ba5ea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.