Error as below(Removed actual ips): I guess the loop is not iterated as desired from CSV items. Pls help
sudo ansible-playbook mac-test1.yml -D -C --limit VM[1] -i ../../lab-inventories/LAB2/hosts
PLAY [all] **************************************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************
ok: [VM1]
TASK [All IPV4 address in system] ***************************************************************************************************
ok: [VM1]
TASK [debug] ************************************************************************************************************************
ok: [VM1] => {
"all_ipv4_address": {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"x.x.x.x",
"y.y.y.y",
"z.z.z.z"
]
},
"changed": false,
"failed": false
}
}
TASK [Ip vs Mac Inside CSV] *********************************************************************************************************
ok: [VM1] => (item=failed) => {
"msg": "The MAC address of failed is []"
}
ok: [VM1] => (item=changed) => {
"msg": "The MAC address of changed is []"
}
ok: [VM1] => (item=ansible_facts) => {
"msg": "The MAC address of ansible_facts is []"
}
PLAY RECAP **************************************************************************************************************************
VM1 : ok=4 changed=0 unreachable=0 failed=0
With Regards
Rakesh