Forum Discussion

K_384560's avatar
Icon for Nimbostratus rankNimbostratus
Feb 25, 2019

Ansible offline member fail when use bigip_pool_member

I want to use Ansible to make the BIG-IP pool member offline, I found below code in Ansible document.


I use the node IP address on "host" parameter (I tried input IP address directly), but it doesn't work when I use IP address, only use node name can success offline line the member, is it possible to use the node IP address to offline?


Also, if the node IP didn't used, BIG-IP will create new node and assign to pool, both IP and name will use IP address and the state will be offline. Is it possible to stop BIG-IP create new node?


Ansible code
- name: Force pool member offline
    user: admin
    password: secret
    state: forced_offline
    pool: my-pool
    partition: Common
    host: "{{ ansible_default_ipv4['address'] }}"
    port: 80
  delegate_to: localhost

The error output (If use IP address)
fatal: [ -> localhost]: FAILED! => {"changed": false, "msg": "400 Unexpected Error: Bad Request for uri: https://mybigipaddress:443/mgmt/tm/ltm/pool/~Common~QA_Pool/members/\nText: u'{\"code\":400,\"message\":\"0107003a:3: Pool member node (/Common/ and existing node (/Common/test02) cannot use the same IP Address (\",\"errorStack\":[],\"apiError\":3}'"}

The success output (If use node name)
changed: [ -> localhost] => {"changed": true, "session": "user-disabled", "state": "forced_offline"}
No RepliesBe the first to reply