bigip_virtual_server

I managed to use all bigip functionality (adding nodes, pools etc.) via ansible. However, when I try to create a virtual server it is throwing an exception and I am not sure how to resolve it.

ansible-playbook playbooks/bigip_f5/f5-create-vs.yml

PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [henrysf5ltm]

TASK [Create Virtual Server CustomerA] *****************************************
fatal: [henrysf5ltm → localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “received exception: bigip_api() takes exactly 4 arguments (3 given)”}

PLAY RECAP *********************************************************************
henrysf5ltm : ok=1 changed=0 unreachable=0 failed=1

Any idea what’s causing this?

Hey Heinrich,

Which version of ansible are you using? We added a certificate validation parameter that is likely causing that exception, but would like to know which ansible version is in use.

-tim

I am using ansible version 2.0.0.2

hpiard@parker:~/PycharmProjects/ansible_idms_dev$ ansible --version
ansible 2.0.0.2
config file = /home/hpiard/PycharmProjects/ansible_idms_dev/ansible.cfg
configured module search path = Default w/o overrides

Lemme take a look here and will figure out what is amiss

Here is my playbook:

  • hosts: henrysf5ltm
    connection: local
    tasks:
  • name: Create Virtual Server CustomerA
    local_action:
    module: bigip_virtual_server
    server: henrysf5ltm
    user: ansible
    password: ansible
    state: present
    partition: Common
    name: Web_Site_CustomerA
    destination: “192.168.7.10”
    port: 80
    pool: Web_Pool_Apache
    description: CustomerA
    validate_certs: no

Looks like a bug. I will open a ticket and send in a fix for it. If you’re interested, we can fix it offline in your install too until the next official release.

-tim

Lemme take a look here and will figure out what is amiss

Hi Tim,

it would be wonderful if you could help me to get this fixed until new release.

For those who run into the same issue.
This is the actual fix. Thanks Tim!

https://github.com/caphrim007/ansible-modules-extras/commit/56a517b054e8b24e23c6781c081db31af3fb2ae7