I noticed there is a difference in how Ansible 1.5.5 handles this vs. Ansible 1.6 Git May 1, 2014.
Ansible 1.6 Git is now including role variables in the hostvars scope. I have one remaining issue
in 1.6 which is if the variable being referenced itself references another variable, the ultimate value
is not being properly assembled.
slack_dir: 'slackware/slackware64-{{ slack_ver }}'
slack_url: '{{ slack_mir }}/{{ slack_dir }}'
alpine_sb_url: '{{ slack_url }}/source/n/alpine'
pkg: 'alpine'
When I reference as below, the final variable is not being properly assembled
as seen in the Ansible 1.6 error message below.
{{ hostvars[inventory_hostname][pkg + '_sb_url'] }}
Ansible 1.5.5
==========
fatal: [work1] => One or more undefined variables: 'dict object' has no attribute 'alpine_sb_url'
FATAL: all hosts have already failed -- aborting
Ansible 1.6 GIT as of May 1, 2014
==========================
failed: [work1] => {"changed": true, "cmd": ["rsync", "-r", "{{slack_url}}/source/n/alpine/", "/usr/local/src/alpine"], "delta": "0:00:00.127109", "end": "2014-05-01 10:39:18.996855", "item": "", "rc": 23, "start": "2014-05-01 10:39:18.869746"}
stderr: rsync: change_dir "/root//{{slack_url}}/source/n/alpine" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.0]
FATAL: all hosts have already failed -- aborting
--------------