bigip_pool_member
8 Topicsansible - bigip_pool_member: cannot add pool member from "Common" to pool "Test"
Hi I'm running into an issue when I create pool member in /Common and create a pool in /Test, I'm unable to add the pool members to the pool using ansible bigip_pool_member. playbook # # Filename : pooltest.yaml # Date : 20 Jul 2020 # Author : Balaji Venkataraman (xbalaji) # Description : playbook to configure bigip pool with members in different partition - name: create bigip_pool and add members to it hosts: all connection: local gather_facts: False vars: remove_resources: false lx_pool_name: "xbltmpool" lx_provider: server: "{{inventory_hostname}}" user: "{{f5_username}}" password: "{{f5_password}}" validate_certs: False timeout: 30 pool_members: - "{{lx_pool_name}}-member-01.company.com" - "{{lx_pool_name}}-member-02.company.com" tasks: - name: set create or delete flag delegate_to: localhost set_fact: lx_state: "{% if remove_resources|lower == 'true' %}absent{% else %}present{% endif %}" lx_action: "{% if remove_resources|lower == 'true' %}delete{% else %}create{% endif %}" - name: "{{lx_action}} pool members" delegate_to: localhost bigip_node: name: "{{item}}" fqdn: "{{item}}" state: "{{lx_state}}" provider: "{{lx_provider}}" partition: "/Common" description: "ansible created LTM node - xbalaji" loop: "{{pool_members|flatten(1)}}" - name: "{{lx_action}} the pool" delegate_to: localhost bigip_pool: state: "{{lx_state}}" name: "{{lx_pool_name}}" partition: "/Test" lb_method: "round-robin" monitors: - "/Common/http" provider: "{{lx_provider}}" - name: "{{lx_action}} pool members to {{lx_pool_name}} " delegate_to: localhost bigip_pool_member: state: "{{lx_state}}" pool: "{{lx_pool_name}}" partition: "/Test" name: "{{item}}" fqdn: "{{item}}" port: "80" fqdn_auto_populate: "no" preserve_node: "yes" reuse_nodes: "yes" provider: "{{lx_provider}}" loop: "{{pool_members|flatten(1)}}" output: PLAY [create bigip_pool and add members to it] ********************************************************************************************************************** TASK [set create or delete flag] ************************************************************************************************************************************ ok: [f5adcfxioc01-apidev.net.pge.com] TASK [create pool members] ****************************************************************************************************************************************** changed: [f5adcfxioc01-apidev.net.pge.com] => (item=xbltmpool-member-01.company.com) changed: [f5adcfxioc01-apidev.net.pge.com] => (item=xbltmpool-member-02.company.com) TASK [create the pool] ********************************************************************************************************************************************** changed: [f5adcfxioc01-apidev.net.pge.com] TASK [create pool members to xbltmpool] ***************************************************************************************************************************** failed: [f5adcfxioc01-apidev.net.pge.com] (item=xbltmpool-member-01.company.com) => {"ansible_loop_var": "item", "changed": false, "item": "xbltmpool-member-01.company.com", "msg": "01070734:3: Configuration error: FQDN Node (/Test/xbltmpool-member-01.company.com:xbltmpool-member-01.company.com) already exists as Node (/Common/xbltmpool-member-01.company.com)"} failed: [f5adcfxioc01-apidev.net.pge.com] (item=xbltmpool-member-02.company.com) => {"ansible_loop_var": "item", "changed": false, "item": "xbltmpool-member-02.company.com", "msg": "01070734:3: Configuration error: FQDN Node (/Test/xbltmpool-member-02.company.com:xbltmpool-member-02.company.com) already exists as Node (/Common/xbltmpool-member-02.company.com)"} PLAY RECAP ********************************************************************************************************************************************************** f5adcfxioc01-apidev.net.pge.com : ok=3 changed=2 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 seeing the following error, can someone let me know if there is anything that needs to be changed or is this a known problem. Thanks and Regards, BalajiSolved767Views0likes1Commentansible bigip_pool_member intermittently not adding member to pool
We have an ansible script that we are using to move nodes in and out of pools for testing that intermittently refuses to add the pool member thinking we are trying to add it to the root folder. The issue is that the failures are now happening almost every time, despite no changes to the script and no recent changes to our F5. Verbose mode shows it has the correct partition, but somehow that partition info is not being read or taken in properly. Thanks in advance for any help. ansible version 1.9.1 (and stuck on this version for a while) Here's what we see when running the playbook: TASK: [enable new nodes on external checkout pool] **************************** <127.0.0.1> REMOTE_MODULE bigip_pool_member server=10.10.10.10 user=myuser password=VALUE_HIDDEN state=present pool=EXTERNAL_CHECKOUT_POOL **partition=WEB-GENERAL-CORE** host=MYHOST14 port=2180 <127.0.0.1> EXEC ['/bin/bash', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1457566442.5-241342532701996 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1457566442.5-241342532701996 && echo $HOME/.ansible/tmp/ansible-tmp-1457566442.5-241342532701996'] <127.0.0.1> PUT /tmp/tmp59N5mT TO /home/myuser/.ansible/tmp/ansible-tmp-1457566442.5-241342532701996/bigip_pool_member <127.0.0.1> EXEC ['/bin/bash', '-c', u'LANG=C LC_CTYPE=C /usr/bin/python /home/myuser/.ansible/tmp/ansible-tmp-1457566442.5-241342532701996/bigip_pool_member; rm -rf /home/myuser/.ansible/tmp/ansible-tmp-1457566442.5-241342532701996/ >/dev/null 2>&1'] failed: [localhost -> 127.0.0.1] => (item=MYHOST14) => {"failed": true, "item": "MYHOST14"} msg: received exception: Server raised fault: 'Exception caught in LocalLB::urn:iControl:LocalLB/Pool::add_member_v2() Exception: Common::OperationFailed primary_error_code : 17241203 (0x01071473) secondary_error_code : 0 error_string : 01071473:3: Create, modify, and delete commands are not valid for (by class: pool_member) while in the root folder.' FATAL: all hosts have already failed -- aborting509Views0likes3CommentsAssign an Existing Node to Pool in F5 BIG IP through F5-SDK
Is there any way to assign a node that already exists in the Common partition to a pool that also already exists? For example: Call pool and node pool = bigip.tm.ltm.pools.pool.load(name="mypool", partition='Common') node = bigip.tm.ltm.nodes.node.load(name="mynode", partition='Common') First Option pool.members_s.members.create(name=node.name, partition="Common") pool.update() Second Option pool.members_s.members[0] = node I don't know if the code is exactly correct, thanks in advance415Views0likes2CommentsIs Autoscaling possible with F5?
In our environment, we would want to auto scale the existing number of servers by adding new servers to Pool and removing some servers from pool dynamically. Is there a way to achieve this with the help of F5 APIs or else what is the best way to achieve this case.329Views0likes2CommentsManaging Multiple GTM & LTM Pool Members Over iControl REST
Currently, I have automation that manages pool member states in series. It will be trivial to work through a list of members that I might want to enable or disable programmatically, but I wonder if it's possible to pass a list in my request to the API. Is it possible to enable or disable more than one pool member with a single call? Thanks.327Views0likes1CommentVIP is not accessible but direct servers are reachable
I have a scenario where the VIP is not reachable but the pool members are reachable. My virtual server is 10.1.130.100:5003, my pool members are 10.1.130.83:5003,10.1.130.85:5003,10.1.130.87:5003,10.1.130.89:5003. I created an iapp based on Weblogic for it,I have AUTOMAP enabled but the application owners insist,they can't access the VIP, but can access the individual pool members directly. What is the solution to this.318Views0likes1CommentiRule to redirect application to pool and change url
When setting up a f5 irule, I am trying to do the following: When an external url is hit, redirect to an internal pool of servers based on a url. Example: external= I want this to map to server pool of urls: server1.com:8080/application or server2.com:8080/application or server3.com:8080/application I need it to only direct if the server url is up. Does anyone have an idea? Basicly going to ww.abc.com/test redirect/proxies to server2.com:8080/application/test. and redirect/proxies to server2.com:8080/application. This is what I have so far: when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] { "/application*" { pool This_abc.com_WEB-R_8080 snatpool WEB-R_SNAT_Pool } } }256Views0likes1Comment