THanks Brian. I can't seem to get this working. I can access the individual
items using indexing
(this works:
- set_fact: mybackend="{{ db[0] }}"
)
But I can't for the life of me figure out how to access by "item name" (or
if that's even a valid thing in yaml). I can obviously redo the way I
format the contents of my variable file, but I can't seem to strike gold.
Struggling to find a good example of this in the docs/examples.
On Thursday, September 10, 2015 at 12:12:43 AM UTC+2, Brian Coca wrote:
>
> set_fact:
> mybackend="{{hostvars[inventory_hostname]['db'][varwithbackendnumber]}}"
>
>
>
>
> --
> Brian Coca
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1a3f7c28-53d0-454f-88fc-0bfba08358fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.