I finally figured out what I was doing wrong and thought I would share. The 
host is 10.1.0.241, not "test" (that is the group name).  My host_vars file 
should be /etc/ansible/host_vars/10.1.0.241.  Once I corrected the file 
name, everything worked as expected.



On Thursday, July 31, 2014 12:21:09 PM UTC-4, Jason Sarrells wrote:
>
> I cannot get anything in host_vars to load when running a playbook.  I am 
> using Ansible 1.4.3.  What am I doing wrong?
>
>
>
>
> ~/test.yml
> ---
> -hosts: test
>  tasks:
>     - name: debug
>       debug: var={{ foo }}
>
> /etc/ansible/hosts
> [test]
> 10.1.0.241
>
>
>
>
> /etc/ansible/host_vars/test
> ---
> foo: bar
>
>
> or
>
>
> ~/host_vars/test
> ---
> foo: baz
>
>
>

-- 
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/99a3390d-ad1a-4eb3-9bc3-f7e06610e29f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to