I know that module setup provides Mac addresses per interface, for example:
"ansible_eth0": {
"active": true,
"device": "eth0",
"ipv4": {
"address": "192.168.35.174",
"broadcast": "192.168.35.255",
"netmask": "255.255.255.0",
"network": "192.168.35.0"
},
"ipv6": [
{
"address": "fe80::250:56ff:fe91:a6c2",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "00:50:56:91:a6:c2",
"module": "vmxnet3",
"mtu": 1500,
"pciid": "0000:0b:00.0",
"promisc": false,
"speed": 10000,
"type": "ether"
Suppose the server has 10 interfaces and I want to gather all their mac's, separated with semicolon. How would I do that if I don't know how many interfaces server has and I don't know their names?