There should be nothing about the different variable syntaxes making a
difference here, fact loading is exactly the same and templating runs the
same for each.
What I have caught though is a typo in your original:
- $vars/$ansible_distributiion.yml
And also that vars is reserved.
https://github.com/ansible/ansible/blob/devel/lib/ansible/runner/__init__.py#L454
On Wed, Jan 1, 2014 at 6:10 PM, Kevin Fenzi <[email protected]> wrote:
> Greetings.
>
> I'm running into something weird with vars_files and I thought I would
> ask the list if it's a bug I should file or if I am just doing
> something wrong. ;)
>
> I had:
>
> vars_files:
> - /srv/web/infra/ansible/vars/global.yml
> - $private/vars.yml
> - $vars/$ansible_distributiion.yml
>
> and private and vars were both defined in global.yml and all worked.
>
> Switching to new syntax:
>
> vars_files:
> - /srv/web/infra/ansible/vars/global.yml
> - "{{ private }}/vars.yml"
> - "{{ vars }}/{{ ansible_distribution }}.yml"
>
> results in the last vars file never loading. If I replace {{ vars }} by
> the path it loads fine. If I replace the {{ ansible_distribution }}with
> a hard coded one it loads ok. It's like it's not expanding multiple
> variables in the same import line?
>
> As a side note, at some points I see it mentioning that the distro vars
> file is being imported, but not other times. When does ansible-playbook
> note "importing ..." ?
>
> Thanks for any thoughts...
>
> kevin
>
>
--
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].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.