On 16 September 2014 10:58, Michael DeHaan <[email protected]> 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
--
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/CAE1pOi1R7jwgQJBveNwuO%3D%3DogNOtF%2B2eP%2B%3DXj5zNFHeOCJHNJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.