Hi
I’ve got an issue with the variables coming from the setup module
It list all the network interfaces on the target system and I need to reuse the ip address from the eth0:0 interface in a template
From the setup module :
“ansible_eth0”: {
“active”: true,
“device”: “eth0”,
“ipv4”: {
“address”: “10.0.2.15”,
“netmask”: “255.255.255.0”,
“network”: “10.0.2.0”
},
“ipv6”: [
{
“address”: “fe80::a00:27ff:febb:8ca9”,
“prefix”: “64”,
“scope”: “link”
}
],
“macaddress”: “08:00:27:bb:8c:a9”,
“module”: “e1000”,
“mtu”: 1500,
“type”: “ether”
},
“ansible_eth0:0”: {
“active”: true,
“device”: “eth0”,
“ipv4”: {
“address”: “192.168.77.60”,
“netmask”: “255.255.255.0”,
“network”: “192.168.77.0”
},
“macaddress”: “08:00:27:bb:8c:a9”,
“module”: “e1000”,
“mtu”: 1500,
“type”: “ether”
},
To access it i’ve tried different format but either the play stopped or in the final file, the name of the variable is written not the content
{{ “ansible_eth0:0.ipv4.address” }}
{{ “ansible_eth0:0”.ipv4.address }}
And same with the $ notation
Is there a way to get it or is it a bug ?
Thanks
Frank