Forum Discussion
Figured it out, I had to set PYTHONPATH export PYTHONPATH=/usr/local/lib/python2.7/site-packages
Super psyched to get started with Ansible and F5...
- Thomas_A__McGonNov 04, 2016Historic F5 Account
Ran into another issue. It appears that after Python 2.7.9 python is now checking to see if a self signed cert is in use. The error is pretty ugly. It is:
"msg": "received exception: \ntraceback: Traceback (most recent call last):\n File \"/var/folders/_r/ht1v5f8n31s9cm78mjn9scpw0000gn/T/ansible_JxdNYg/ansible_module_bigip_facts.py\", line 1659, in main\n saved_active_folder = ()\n File \"/var/folders/_r/ht1v5f8n31s9cm78mjn9scpw0000gn/T/ansible_JxdNYg/ansible_module_bigip_facts.py\", line 143, in get_active_folder\n return self.api.System.Session.get_active_folder()\n File \"/usr/local/lib/python2.7/site-packages/bigsuds.py\", line 360, in __getattr__\n client = self._client_creator('%s.%s' % (self._name, attr))\n File \"/usr/local/lib/python2.7/site-packages/bigsuds.py\", line 170, in _create_client\n raise ConnectionError(str(e))\nConnectionError: \n"
To fix this issue, all you need to do is specify validate_certs: false to the end of your bigip Ansible task. i.e.
tasks: - name: Get all of the facts from my BIG-IP bigip_facts: server: "{{ inventory_hostname }}" user: "admin" password: "admin" include: "system_info" validate_certs: "false"
- JRahmNov 05, 2016Admin
yeah, not fun. I use (for interactive development and shorter scripts):
import requests requests.packages.urllib3.disable_warnings()