Ale/Brian

I'm trying to use variables in variables as well...not sure how to do it. 
I'm using set facts

Below is the when condition:


hardcoded:

 when: "'{{ hostvars[groups['app-a1'][0]]['target_app_build'] }}' != '{{ 
hostvars[groups['app-a1'][0]]['actual_app_build'] }}'"


what I need:


 when: "'{{ hostvars[groups['app-a1'][{{ partition }}]]['target_app_build'] 
}}' != '{{ hostvars[groups['app-'][{{ partition }}]]['actual_app_build'] 
}}'"


Here {{ partition }} - is an extra variable



It doesn't seem to be working for me.

Thanks,
Virendra

On Tuesday, August 4, 2015 at 7:58:08 PM UTC+5:30, Alejandro Ferrari wrote:
>
> Hi, I like to know if possible made reference of a variable inside other 
> variable.
>
> Example:
>
> {{ansible_local.oracle.credentials."{{websphere_mb.odbc.schema_name}}"}}
>
> with this I try to build the final variable name that if I put manually 
> works, but like to don't hardcode Schame_name and read from vars file.
>
> this can be possible?
>
> Thanks
> Ale
>

-- 
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/704eff65-6d41-4593-9903-314865b386ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to