[ansible] [openstack-cloud] how to find port by IP address in ansible

jdratlif at globalnoc.iu.edu jdratlif at globalnoc.iu.edu
Tue Jun 7 14:50:34 UTC 2022


How can I get a port by it's IP address using the openstack cloud ansible
modules? This is what I'm trying, but it never yields any results. I do get
results if I use mac_address or device_id until filters, but I need to find
the port by it's IP.

- name: get port info
  openstack.cloud.port_info:
    filters:
      fixed_ips:
        - 'ip_address=123.124.125.126'
    auth: "{{ auth_dict }}"
    region_name: "{{ region }}"

Thanks

---
John Ratliff
Systems Automation Engineer 
GlobalNOC @ Indiana University

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6687 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220607/e4655b99/attachment.bin>


More information about the openstack-discuss mailing list