Hi guys,

i have a RHEL7 vm with this facts that show the network configi:

*[root@****** /etc/ansible]# ansible testserver -m setup -a 
'filter=ansible_eno16777728'*
*********** | success >> {*
*    "ansible_facts": {*
*        "ansible_eno16777728": {*
*            "active": true,*
*            "device": "eno16777728",*
*            "macaddress": "00:50:56:9d:3e:fe",*
*            "module": "e1000",*
*            "mtu": 1500,*
*            "promisc": false,*
*            "type": "ether"*
*        }*
*    },*
*    "changed": false*
*}*

Is there a way to obtain the fact "device" that display the network device 
name from the macaddress?

Somethig like this:

 - name: Print device name know the macaddress
  debug: msg="UUDI={{ ansible_eno*.device }}"
 when ansible_eno*.macaddress == '00:50:56:9d:3e:fe'

Any idea?

Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2bfb3cbf-0e81-406c-9985-f1023f51ebe1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to