Interfaces are different for every server I’m working with, so to print details of each interface, let’s say I’m using the following code in a template:
interfaces: {% for a_value in ansible_interfaces %}{{ a_value }} {% endfor %}
Now this ends up printing:
interfaces: lo enp0s3 enp0s8
This gives us variables ansible_lo
, ansible_enp0s3, ansible_enp0s8 that I want to refer.
Is there any way I can print the value of ansible_lo.value ``using the loop above?
Thanks.