Use the nios_lookup
plug-in to fetch NIOS specified objects. The plug-in uses Infoblox WAPI to fetch the objects. You can filter the returned data by adding keywords. You can also specify the set of fields that must be returned.
The following table describes the parameters you can define in the nios_lookup plug-in
:
Parameter | Required/Optional | Description |
---|---|---|
terms | Required | The name of the network object that must be returned from the NIOS appliance. |
return_fields | Required | The list of field names to return for the specified object. |
filter | Required | A dictionary object that is used to filter the returned objects. |
extattrs | Optional | A dictionary object that is used to filter the returned objects according to extensible attributes. |
| Required | Defines the details of the connection:
For information on additional fields you can define, see the list of subparameters. |
connection | Required | The nios_lookup module must be run locally. |
Examples
name: fetch all networkview objects
ansible.builtin.set_fact:
networkviews: "{{ lookup('infoblox.nios_modules.nios_lookup', 'networkview', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
name: fetch the default dns view
ansible.builtin.set_fact:
dns_views: "{{ lookup('infoblox.nios_modules.nios_lookup', 'view', filter={'name': 'default'},
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"