Documentation update needed: vars_files no longer expands 'facts' variables in paths since 1.5.4

50 views
Skip to first unread message

Paddy Doyle

unread,
May 14, 2014, 1:12:07 PM5/14/14
to ansible...@googlegroups.com
Hi,

The 1.5.4 change to stop expanding 'facts' variables in 'vars_files' paths has just hit me (I know I'm behind, running of Scientific Linux 6 so updates are slow!).

I'd just like to point out that the web documentation needs to be updated: specifically the 'vars_files' example in the 'Conditional Imports' section still uses "{{ansible_os_family}}" in the path:

http://docs.ansible.com/playbooks_variables.html#conditional-imports


I'd like to also ask for some advice on how to update my playbooks now to deal with the new behaviour.

I know there's a note saying that the feature isn't used that often, and points you to the 'group_by' module, but to be honest the examples on the group_by page make no sense to me (http://docs.ansible.com/group_by_module.html).

This is what I have (and worked prior to 1.5.4):

  vars_files:
    - ../vars/global.yml
    - ../vars/{{ansible_distribution}}.yml

(and so I have a 'vars/Ubuntu.yml' and 'vars/Scientific.yml' etc where I put a couple of OS-specific vars).

I guess I'll need to reorganise things and maybe use {{ansible_distrubution}} more, but if anyone has an example of how they migrated, I'd appreciate it.

Thanks,
Paddy

Michael DeHaan

unread,
May 14, 2014, 6:18:22 PM5/14/14
to ansible...@googlegroups.com
No update is ever needed for a bug - we fix the bug.

In this case, this should already be addressed by 1.6.

The current released version of Ansible is 1.6.1, and since you are using Scientific Linux, I highly recommend using EPEL to get the latest Ansible - it's good stuff.




--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2b8645fe-0244-461f-9159-02c403f918c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paddy Doyle

unread,
May 15, 2014, 4:16:52 AM5/15/14
to ansible...@googlegroups.com
Hi Michael,


On Wednesday, 14 May 2014 23:18:22 UTC+1, Michael DeHaan wrote:
No update is ever needed for a bug - we fix the bug.

In this case, this should already be addressed by 1.6.

Ah ok, so the behaviour has been reverted in 1.6, and facts variables now work again in vars_files paths? I looked through the commit logs but I couldn't see any mention of the revert.

 

The current released version of Ansible is 1.6.1, and since you are using Scientific Linux, I highly recommend using EPEL to get the latest Ansible - it's good stuff.

Yeah, I am grabbing from EPEL -- they're still only on 1.5.5.

Thanks,
Paddy
 

Michael DeHaan

unread,
May 15, 2014, 7:29:03 AM5/15/14
to ansible...@googlegroups.com
"I looked through the commit logs but I couldn't see any mention of the revert."

Shouldn't assume it was a revert.




Reply all
Reply to author
Forward
0 new messages