On 16 September 2014 10:58, Michael DeHaan <
mic...@ansible.com> wrote:
> "Actually, I noticed that even these repeated settings do not work. It
> seems this actually needs to be done at the role level?"
>
> Those settings where you have them are correct.
>
> I'm not sure what "doesn't work" means in your case, you'll have to provide
> a bit more info/output there.
I use the variables in a template in a task:
roles/role-1/tasks/task-1. If I do not include the user-vars.yml file
again at the role level (mmm, or rather the task level, I guess)
Ansible complains that it does not know about those variables. Hence
my comment.
roles/role-1/tasks/task-1.yml:
- name: ...
- include_vars: user-vars.yml
- name: "task-name"
template:
src=template.j2
dest=/etc/some-file
This fails without the "include_vars" bit despite the inclusion higher up.
> Yes, ansible_sudo does appear undocumented, as does the ansible_su boolean
> which does the same thing.
>
> Normally something we'd refer to in the "Magic Variables" section at least.
>
> Do you mind filing a ticket about that one? We can add those in.
https://github.com/ansible/ansible/issues/9031