Forum Discussion
[Ansible] get all the pools that a node belongs to
I am trying to create a node by node playbook using ansible bigsuds. The bigip_facts returns all the pool's information. In our case , a single node is part of multiple pools. I wanted to get all the pools as a variable that a node belongs to.
The playbook yaml: - name: Test bigip_facts hosts: bigip connection: local
tasks: - name: Get all of the facts from my BIG-IP bigip_facts: server: "{{ inventory_hostname }}" user: "user" password: "pass" include: "pool" validate_certs: "false"
Ex: { "pool": { "/Common/test_8080": { "action_on_service_down": "SERVICE_DOWN_ACTION_NONE", "active_member_count": 0, "aggregate_dynamic_ratio": 0, "allow_nat_state": "STATE_ENABLED", "allow_snat_state": "STATE_ENABLED", "client_ip_tos": 65535, "member": [ { "address": "/Common/192.168.1.101", "port": 8080 }, { "address": "/Common/192.168.1.102", "port": 8080 } ] }, "/Common/test_8090": { "action_on_service_down": "SERVICE_DOWN_ACTION_NONE", "active_member_count": 0, "aggregate_dynamic_ratio": 0, "allow_nat_state": "STATE_ENABLED", "allow_snat_state": "STATE_ENABLED", "client_ip_tos": 65535, "member": [ { "address": "/Common/192.168.1.101", "port": 8090 }, { "address": "/Common/192.168.1.102", "port": 8090 } ] } } }
1 Reply
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com