Yep, I can replicate this.

include_vars is new for 1.4.X so we probably missed a possible use case
that someone would want to try.

Please file a github ticket.

Meanwhile, you can work around this in a play like so:

- hosts: webservers
  vars_files:
      - [ "{{ ansible_hostname }}.yml", "defaults.yml" ]
  roles:
      - ...

This needs to be set at play level rather than role level, but is basically
the original facility ansible had for doing this.


On Sat, Nov 30, 2013 at 5:50 AM, Anand Buddhdev <[email protected]> wrote:

> On Saturday, 30 November 2013 01:16:15 UTC+1, Gonzalo Servat wrote:
>
> Hi Gonzalo,
>
> If you run the setup module on localhost, is 'ansible_hostname' correctly
>> filled in?
>>
>
> Yes, it is:
>
> $ ansible localhost -m setup | grep ansible_hostname
>
>         "ansible_hostname": "clabbers",
>
> My laptop is called "clabbers".
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <[email protected]>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to