Build a var containing a var

Hi,

In a playbook, I’d like to define a variable with another variable inside. Example:

{{ansible_{{interface}}.ipv4.address}}

What is the best way to do that ?

Thanks

moustaches don't stack, but you can access any host's vars via hostvars

`{{ hostvasr[inventory_hostname]['ansible' + interface]['ipv4']['address'] }}`

Thanks !