On 22. nov. 2016 11:14, Adnan Arab wrote:
> I want to be able to change the value of a variable depending on a host.
> 
> What I tried was roles/x/vars/host_vars/<host>/main.yml but this does not 
> seem to work.
> 
> Could you please let me know how I can change a variable depending on a 
> host within a role?

host_vars is a feature of the top level, not in the roles

https://docs.ansible.com/ansible/playbooks_best_practices.html#directory-layout

-- 
Kai Stian Olstad

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f75d7c4d-7253-187f-a525-bc14c314a908%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to