Infoblox configuration

133 views
Skip to first unread message

tapan behera

unread,
May 5, 2022, 8:27:36 AM5/5/22
to AWX Project
Hi Team,

Please help me to configure  infoblox in new AWX environment.

I am using:
  • AWX Operator 0.20.2
  • AWX 21.0.0
Thanks

John Westcott

unread,
May 6, 2022, 8:58:23 AM5/6/22
to tapan behera, AWX Project
Hello, we'd love to help but we need a little more information about the problem you're having. What have you tried? Whats working? Whats not working? Screenshots, log outputs, or any reproducers would be very helpful.

- The AWX team


--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/da51660a-7519-4b9f-9f7c-236234f3ae3cn%40googlegroups.com.

Message has been deleted

tapan behera

unread,
Aug 1, 2023, 10:35:59 AM8/1/23
to AWX Project
Hi John,

I am trying to automate the IP allocation in Infoblox using AWX (Version 22.3.0)

We have installed infoblox-client on remote server 
$ pip list |grep infoblox
infoblox-client        0.6.0

Python 3.10.6

The job got failed with below error
==============
FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "module_stderr": "Shared connection to <Remote Server> closed.\\r\\n",
    "module_stdout": "Failed on object search with url https://<infoblox server>/wapi/v2.9/record%3Ahost?name=testhostname&view=default&_return_fields=name%2Cview%2Cipv4addrs%2Cipv6addrs%2Cconfigure_for_dns%2Caliases%2Cttl%2Cextattrs%2Ccomment&_max_results=1000: b'{ \\"Error\\": \\"AdmConDataNotFoundError: View default not found\\", \\\\n  \\"code\\": \\"Client.Ibap.Data.NotFound\\", \\\\n  \\"text\\": \\"View default not found\\"\\\\n}'\\r\\nFailed on object search with url https://<infoblox servername>/wapi/v2.9/record%3Ahost?name=testhostname&view&view=default&_return_fields=name%2Cview%2Cipv4addrs%2Cipv6addrs%2Cconfigure_for_dns%2Caliases%2Cttl%2Cextattrs%2Ccomment&_max_results=1000&_proxy_search=GM: b'{ \\"Error\\": \\"AdmConDataNotFoundError: View default not found\\", \\\\n  \\"code\\": \\"Client.Ibap.Data.NotFound\\", \\\\n  \\"text\\": \\"View default not found\\"\\\\n}'\\r\\nTraceback (most recent call last):\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 317, in get_object\\r\\n    return self._handle_get_object(obj_type, query_params, extattrs,\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 354, in _handle_get_object\\r\\n    return self._get_object(obj_type, url)\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 370, in _get_object\\r\\n    r.raise_for_status()\\r\\n  File \\"/usr/lib/python3/dist-packages/requests/models.py\\", line 943, in raise_for_status\\r\\n    raise HTTPError(http_error_msg, response=self)\\r\\nrequests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://<infoblox server>/wapi/v2.9/record%3Ahost?name=testhostname&view&view=default&_return_fields=name%2Cview%2Cipv4addrs%2Cipv6addrs%2Cconfigure_for_dns%2Caliases%2Cttl%2Cextattrs%2Ccomment&_max_results=1000\\r\\n\\r\\nDuring handling of the above exception, another exception occurred:\\r\\n\\r\\nTraceback (most recent call last):\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 53, in callee\\r\\n    return func(*args, **kwargs)\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 321, in get_object\\r\\n    return self._handle_get_object(obj_type, query_params,\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 354, in _handle_get_object\\r\\n    return self._get_object(obj_type, url)\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 370, in _get_object\\r\\n    r.raise_for_status()\\r\\n  File \\"/usr/lib/python3/dist-packages/requests/models.py\\", line 943, in raise_for_status\\r\\n    raise HTTPError(http_error_msg, response=self)\\r\\nrequests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://<infoblox server>/wapi/v2.9/record%3Ahost?name=testhostname&view=default&_return_fields=name%2Cview%2Cipv4addrs%2Cipv6addrs%2Cconfigure_for_dns%2Caliases%2Cttl%2Cextattrs%2Ccomment&_max_results=1000&_proxy_search=GM\\r\\n\\r\\nDuring handling of the above exception, another exception occurred:\\r\\n\\r\\nTraceback (most recent call last):\\r\\n  File \\"/home/svc-ansible/.ansible/tmp/ansible-tmp-1690897716.629077-28-168160762768520/AnsiballZ_nios_host_record.py\\", line 107, in <module>\\r\\n    _ansiballz_main()\\r\\n  File \\"/home/svc-ansible/.ansible/tmp/ansible-tmp-1690897716.629077-28-168160762768520/AnsiballZ_nios_host_record.py\\", line 99, in _ansiballz_main\\r\\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\\r\\n  File \\"/home/svc-ansible/.ansible/tmp/ansible-tmp-1690897716.629077-28-168160762768520/AnsiballZ_nios_host_record.py\\", line 47, in invoke_module\\r\\n    runpy.run_module(mod_name='ansible_collections.infoblox.nios_modules.plugins.modules.nios_host_record', init_globals=dict(_module_fqn='ansible_collections.infoblox.nios_modules.plugins.modules.nios_host_record', _modlib_path=modlib_path),\\r\\n  File \\"/usr/lib/python3.10/runpy.py\\", line 224, in run_module\\r\\n    return _run_module_code(code, init_globals, run_name, mod_spec)\\r\\n  File \\"/usr/lib/python3.10/runpy.py\\", line 96, in _run_module_code\\r\\n    _run_code(code, mod_globals, init_globals,\\r\\n  File \\"/usr/lib/python3.10/runpy.py\\", line 86, in _run_code\\r\\n    exec(code, run_globals)\\r\\n  File \\"/tmp/ansible_infoblox.nios_modules.nios_host_record_payload_ai1e9akn/ansible_infoblox.nios_modules.nios_host_record_payload.zip/ansible_collections/infoblox/nios_modules/plugins/modules/nios_host_record.py\\", line 373, in <module>\\r\\n  File \\"/tmp/ansible_infoblox.nios_modules.nios_host_record_payload_ai1e9akn/ansible_infoblox.nios_modules.nios_host_record_payload.zip/ansible_collections/infoblox/nios_modules/plugins/modules/nios_host_record.py\\", line 367, in main\\r\\n  File \\"/tmp/ansible_infoblox.nios_modules.nios_host_record_payload_ai1e9akn/ansible_infoblox.nios_modules.nios_host_record_payload.zip/ansible_collections/infoblox/nios_modules/plugins/module_utils/api.py\\", line 303, in run\\r\\n  File \\"/tmp/ansible_infoblox.nios_modules.nios_host_record_payload_ai1e9akn/ansible_infoblox.nios_modules.nios_host_record_payload.zip/ansible_collections/infoblox/nios_modules/plugins/module_utils/api.py\\", line 752, in get_object_ref\\r\\n  File \\"/tmp/ansible_infoblox.nios_modules.nios_host_record_payload_ai1e9akn/ansible_infoblox.nios_modules.nios_host_record_payload.zip/ansible_collections/infoblox/nios_modules/plugins/module_utils/api.py\\", line 232, in _invoke_method\\r\\n  File \\"/usr/local/lib/python3.10/dist-packages/infoblox_client/connector.py\\", line 57, in callee\\r\\n    raise ib_ex.InfobloxConnectionError(reason=e)\\r\\ninfoblox_client.exceptions.InfobloxConnectionError: Infoblox HTTP request failed with: 404 Client Error: Not Found for url: https://<infoblox server>/wapi/v2.9/record%3Ahost?name=testhostname&view&view=default&_return_fields=name%2Cview%2Cipv4addrs%2Cipv6addrs%2Cconfigure_for_dns%2Caliases%2Cttl%2Cextattrs%2Ccomment&_max_results=1000&_proxy_search=GM\\r\\n",
    "msg": "MODULE FAILURE\\nSee stdout/stderr for the exact error",
    "rc": 1
=====================================

- name: Dynamically add host record to next available ip
  infoblox.nios_modules.nios_host_record:
    name:  testhostname
    ipv4:
      - address: {nios_next_ip: 203.0.113.0/24}
    comment: this is a test comment
    state: present
    provider:
      host: "{{ inventory_hostname_short }}"
      username: "{{ infoblox_username }}"
      password: "{{ infoblox_password }}"
      #  connection: local
      wapi_version: 2.12.2
    extattrs:
      _Completed By: "{{ Vcenterusername }}"
      _Request Number: "{{ Request_number }}"
      Completed On: "{{ today_date }}"

tapan behera

unread,
Aug 4, 2023, 1:15:20 AM8/4/23
to AWX Project
Hi All,

Could you please help me on this .

Thanks

AWX Project

unread,
Aug 9, 2023, 2:38:43 PM8/9/23
to AWX Project
From the error it looks like you are connecting to your infoblox server but the search its trying to perform is not right for some reason. We see the error "AdmConDataNotFoundError: View default not found". You might want to reach out to the maintainer of the infoblox collection. Maybe its a versioning issue between your infoblox and what the module supports? Or maybe a parameter is missing? It looks like the error message has actually been reported against the ansible modules at one point, maybe that will shed a clue? https://github.com/ansible/ansible/issues/37949 

Either way, this does not appear to be an issue with AWX itself. 

-The AWX Team

Reply all
Reply to author
Forward
0 new messages