Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Ansible nios call
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2021 07:56 AM
909     0
Hi everyone,
I'm trying to filter out some 'UNMANAGED' ip records as they are clogging our customers dhcp scopes. when i run:
hosts: "{{ lookup('nios', 'search', filter={'address': '10.150.3.216'},provider=nios_provider) }}"
I get below object back
ok: [CUSTOMER_HOST] => { "hosts": [ { "_ref": "ipv4address/whatever:10.150.3.216", "ip_address": "10.150.3.216", "is_conflict": false, "mac_address": "", "names": [], "network": "10.150.3.0/24", "network_view": "default", "objects": [], "status": "USED", "types": [ "UNMANAGED" ], "usage": [] }, "comment": "", "network": "10.150.3.0/24", "network_view": "default" } ]
Now i want to try and search for all records matching "types" : "UNMANAGED" however this doesn't seem to exist as a filter..
Failed on object search with url https://CUSTOMER_HOST/wapi/v2.11.2/search?types=unmanaged&_max_results=1000: b'{ "Error": "AdmConProtoError: Unknown argument/field: \'types\'", \n "code": "Client.Ibap.Proto", \n "text": "Unknown argument/field: \'types\'"\n}' Failed on object search with url https://CUSTOMER_HOST/wapi/v2.11.2/search?types=unmanaged&_max_results=1000&_proxy_search=GM: b'{ "Error": "AdmConProtoError: Unknown argument/field: \'types\'", \n "code": "Client.Ibap.Proto", \n "text": "Unknown argument/field: \'types\'"\n}'
i'm using WAPI version 2.11.2. Does someone know how to achieve this ?
Thank you,
Stef