Hello ansible devs and users,
In a variables file, I’d like to do something like this:
iface: eth0
address:“{{ ansible_{{ iface }}.ipv4.address }}”
However, this does not work. In a task or template, instead of getting the IPv4 address of eth0, the “address” variable ends up being just “{{ ansible_{{ iface }}.ipv4.address }}”.
Is there any way to achieve what I want to do?
Regards,
Anand