imported module support code does not exist at /usr/lib/python2.6/site-packages/ansible/module_utils/f5.py

Hi guys,

We have Ansible 1.9.1.

I’m working on integration with F5 VIPs using the “bigip” modules supplied with Ansible installation (bigip_pool_member). At first i tried to use it and received errors like: “unsupported parameter for module: session_state” which is state to exist from Ansible version 2.0.

Since we do not want to upgrade yet i downloaded the new modules from https://github.com/ansible/ansible-modules-extras/tree/devel/network/f5 and put them in our custom modules library.

So now i do not get the “unsupported parameter for module: session_state” error but i do get the following error:

fatal: [localhost] => imported module support code does not exist at /usr/lib/python2.6/site-packages/ansible/module_utils/f5.py

any ideas how i can overcome this (besides just coping that file there)?

thanks

those modules rely on features only present in 2.0

Found a way to overcome this.

Basically i just copy the F5.py and change the import in the module.

Copy Task

  • name: Upload python f5 support module
    copy: src=library/linux/f5/f5.py dest=/tmp/f5.py

within bigip_pool_member.py:

import sys
sys.path.append(‘/tmp’)
from f5 import *