To clarify, I am looking for a good general way to reuse tasks in different 
context (for example with different "ansible_user", different "become_user" 
...) without explicitly giving defaults at all times. I understand there is 
a tradeoff here, but the question is really, what's the best way to find 
out?

** some_task.yml **
---
- command: echo success
  become: "{{ become }}"
  become_user: "{{ become_user }}"


** main.yml **
---
# ...
- include: some-task.yml become=true become_user=username
# ...




-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9737936f-37be-468f-ae8b-648fa202da83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to