Open lorimariner opened 7 years ago
I discovered the the request module does not have the package urllib3 so with this entry: requests.packages.urllib3.disable_warnings() It continued to fail.
I modified by adding: import urllib3 urllib3.disable_warnings()
Fixed the error
I am able to connect and verify the existing hosts that are in Infoblox but continue to have this error output:
TASK [Add host] **
task path: /var/lib/awx/projects/ansible-tower/infoblox_example.yml:7
Using module file /usr/share/my_modules/ansible-module-infoblox/infoblox.py
<10.150.253.151> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.150.253.151> EXEC /bin/sh -c 'echo ~ && sleep 0'
<10.150.253.151> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421
" && echo ansible-tmp-1500910719.66-264084341675421="echo /root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421
" ) && sleep 0'
<10.150.253.151> PUT /tmp/tmpyQ58Ax TO /root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421/infoblox.py
<10.150.253.151> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421/ /root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421/infoblox.py && sleep 0'
<10.150.253.151> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421/infoblox.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1500910719.66-264084341675421/" > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_TJu_Sj/ansible_module_infoblox.py", line 771, in
PLAY RECAP *** infoblox : ok=0 changed=0 unreachable=0 failed=1
the last httperror is this: { "Error": "AdmConProtoError: Unknown argument/field: 'ipv4addrs\n\"'", "code": "Client.Ibap.Proto", "text": "Unknown argument/field: 'ipv4addrs\n\"'" }
I have same issue for action "get_a_record"
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_TNQH5i/ansible_module_infoblox.py\", line 185, in
My configuration: ansible-playbook 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/usr/share/ansible/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible-playbook python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
I installed this on Ansible 2.3.0.0 Python 2.7.5; Set my parameters for Infoblox and kept receiving errors: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'module' object has no attribute 'urllib3' failed: [localhost] (item=test01.local) => {"failed": true, "item": "test01.local", "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_94H14V/ansible_module_infoblox.py\", line 8, in\n requests.packages.urllib3.disable_warnings()\nAttributeError: 'module' object has no attribute 'urllib3'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}