Works for me now. I over worked on this and ignored the basics. Thanks Guy 
Matz.

On Monday, October 6, 2014 12:06:32 PM UTC-5, [email protected] wrote:
>
> I am trying to come up with a play book to install cassandra. Here each 
> node has a calculated token (not a random hash) and is unique. So, I have 
> defined a dictionary in the vars/cassandra_variables.yml as below. The 
> IPs 192.168.56.x happen to be the ansible_inventory hosts which are defined 
> in the inventory file as [cassandrahosts]
> How would I access the dictionary through jinja2 template.? 
>
>
> vars/cassandra_variables.yml
> tokens: 
>   192.168.56.1: 0
>   192.168.56.2: 56713727820156410577229101238628035242
>   192.168.56.3: 113427455640312821154458202477256070485
>
>
> 192.168.56.x hosts are coming in from inventory file and in the 
> "cassandra.j2" I have the following 
>
> initial_token: {{ tokens['{{ inventory_hostname}}'] }}
>
> tokens["{{ inventory_hostname}}"] is evaluated but not {{ tokens['{{ 
> inventory_hostname}}'] }}
>
>
> How do I get it to work? Where am I going wrong? Any help is much 
> appreciated.
>
>
> -SR
>

-- 
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/612ec475-363d-4b11-b946-d5e2127c5c9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to