menandmice / menandmice.ansible_micetro / 1.0.7 / lookup / ipinfo Find information of an IP address | "added in version" 2.7 of menandmice.ansible_micetro" Authors: Ton Kersten <t.kersten@atcomputing.nl> for Men&Micemenandmice.ansible_micetro.ipinfo (1.0.7) — lookup
Install with ansible-galaxy collection install menandmice.ansible_micetro:==1.0.7
collections: - name: menandmice.ansible_micetro version: 1.0.7
This lookup collects info of an IP address
- name: Find all info for IP 172.16.17.2 debug: msg: "Info for IP: {{ lookup('menandmice.ansible_micetro.ipinfo', mm_provider, '172.16.17.2') }}" vars: mm_provider: mm_url: http://micetro.example.net mm_user: apiuser mm_password: apipasswd
- name: Get DHCP reservations for 172.16.17.2 debug: msg: "{{ ipinfo['dhcpReservations'] }}" vars: mm_provider: mm_url: http://micetro.example.net mm_user: apiuser mm_password: apipasswd ipinfo: "{{ query('menandmice.ansible_micetro.ipinfo', mm_provider, '172.16.17.2') }}"
ipaddress: description: - The IP address that is examined required: true type: str mm_provider: description: Definition of the Micetro API mm_provider required: true suboptions: mm_password: description: password to login with into the API no_log: true required: true type: str mm_url: description: Men&Mice API server to connect to required: true type: str mm_user: description: userid to login with into the API required: true type: str type: dict
_list: description: A dict containing all results fields: '0': IP address(es)