F5 bigip_pool_member Module bigsuds not found

483 views
Skip to first unread message

Jason Gilfoil

unread,
Jan 22, 2016, 12:20:00 PM1/22/16
to Ansible Project
Hello Ansible Community,

Wondering if anyone familiar with this module could lend a hand. I'm attempting to use the bigip_pool_member module to force a node offline in an F5 LTM pool. However i'm getting the error "the python bigsuds module is required". I've verified that bigsuds is installed on the target F5.

[xxxxx@F5-Test:Active:Standalone] ~ # python
Python 2.4.3 (#1, Apr 22 2015, 16:27:42)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bigsuds
>>> b = bigsuds.BIGIP(
... hostname = 'xx.xx.xx.xx',
... username = 'xxxxx',
... password = 'xxxxx')
>>> b.LocalLB.Pool.get_list()
['/Common/swp_http', '/Common/http']

Here is the example playbook i'm trying to use:

- hosts: all
  tasks:
  - name: set node offline
    local_action: >
      bigip_pool_member
      server=192.168.0.1
      user=ausername
      password=notmypassword
      state=present
      session_state=disabled
      monitor_state=disabled
      pool=http
      partition=common
      host="{{ ansible_default_ipv4['address'] }}"
      port=80

Any insight/assistance would be greatly appreciated.

-Jason

Matt Martz

unread,
Jan 22, 2016, 12:28:22 PM1/22/16
to ansible...@googlegroups.com
You are running via a local_action, which means that `bigip_pool_member` is executing on the ansible control machine, not the F5.  As such you will need to install bigsuds on the ansible control machine.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/19341a55-dbbf-4c14-ab25-75db849a77c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net

Jason Gilfoil

unread,
Jan 22, 2016, 12:53:08 PM1/22/16
to Ansible Project
Oh Duh. Thanks for the quick response! That was indeed the problem. I assume this uses port 80 or 443 instead of ssh then from the ansible server to the F5?

Matt Martz

unread,
Jan 22, 2016, 12:56:08 PM1/22/16
to ansible...@googlegroups.com
That is correct.  The bigsuds module communicates with an F5 via the SOAP API.


For more options, visit https://groups.google.com/d/optout.

Bruno Calçado

unread,
Mar 15, 2017, 9:50:38 AM3/15/17
to Ansible Project
Hi Guys,

I'm having the same problem.  F5 version: 12

$ ansible --version
ansible 2.2.1.0
  config file = ./ansible.cfg
  configured module search path = ['/usr/local/lib/PYTHON_VERSION/site-packages/ansible/modules/extras/network/f5/']


fatal: [F5-04]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "description": null,
            "host": null,
            "lb_method": "round_robin",
            "monitor_type": null,
            "monitors": null,
            "name": "web-bruno",
            "partition": "Common",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "port": null,
            "quorum": null,
            "reselect_tries": null,
            "server": "F5-04",
            "server_port": 443,
            "service_down_action": null,
            "slow_ramp_time": 120,
            "state": "present",
            "user": "admin********",
            "validate_certs": false
        },
        "module_name": "bigip_pool"
    },
    "msg": "the python bigsuds module is required"
}


But I have the bigsuds in my Ansible machine.

[ansible@10 ~]$ python
Python 2.6.6 (r266:84292, Aug  9 2016, 06:11:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2

Type "help", "copyright", "credits" or "license" for more information.
>>> import bigsuds
>>> b=bigsuds.BIGIP(hostname='x.x.x.x', username='********', password=                                                                                                                                                             '********')
>>> b.LocalLB.Pool.get_list()
['/Common/POOL1', '/Common/POOL2', '/Common/POOL5',

Could you help me ?
Thanks in advance.
Best regards,
Bruno

Tim

unread,
Mar 15, 2017, 10:28:08 AM3/15/17
to ansible...@googlegroups.com
This could happen for a number a reasons but most of the time its from

* Not using local_action or delegate_to: localhost in the task
* Running ansible in a virtualenv and not ensuring that bigsuds is installed in the venv and the python interpreter in the localhost host vars points to the venv python


Do either of the above apply?

-tim

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1645bbf9-a1ff-44fa-b43a-74a52b953b40%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages