I guess your problem is the missing quotes, check below an example from
Michael last month
- hosts: all
vars:
cat: yes
x: 42
decoded:
home: "/usr/bob"
moo: yes
xyz: "{{ decoded.home }}"
glorp: "{{ raz }}"
fish: "{{ decoded.xyz }}"
baz: "{{ fish }}"
raz: "{{ decoded.moo }}"
On 28 November 2013 18:55, ureal frank <[email protected]> wrote:
> I guys, ansible newbie here...
>
> I've read how to refere variables inside vars.yml file here:
> http://www.ansibleworks.com/docs/YAMLSyntax.html
>
> foo: 1
> foo_value: {{ foo }}
>
> then under my playbook.yml load vars.yml with vars_file: directive and
> call them with {{ foo_value }}.
> This is working fine but, what about this:
>
> foo:
> bar: hello
> baz: {{ bar }}
>
> and call it under the play with {{ foo.baz }}.
> Is there a way to do this?
>
> I've tried this 4 ways but wihout success... http://pastie.org/8514924
>
> help :)
>
> cheers,
> Frank
>
> --
> 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.
>
--
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.