2.1.3. Adding pool members to a pool¶
Assign pool members to a pool
You will select a node which you will assign to a pool app1_pl. Use the
bigip_pool_member module.
Create a playbook
member.yaml.Type
nano playbooks/member.yamlType the following into the
playbooks/member.yamlfile.--- - name: Add Pool Members to Pool hosts: bigips connection: local vars: valid_certs: no username: admin password: admin server: 10.1.1.245 tasks: - name: Add nodes to pool bigip_pool_member: description: "app1 web servers" host: "{{ item.host }}" password: "{{ password }}" pool: "app1_pl" port: "80" server: "{{ server }}" user: "{{ username }}" validate_certs: "{{ valid_certs }}" delegate_to: localhost loop: - { host: 10.1.20.11 } - { host: 10.1.20.12 }
Ctrl x to save file.
Run this playbook.
- Type
ansible-playbook playbooks/member.yaml
If successful, you should see similar results
- Type
Verify BIG-IP results.
- Select Local Traffic -> Pools -> app1_p1 -> Members
Note
The
bigip_pool_membermodule can configure pools with the details of existing nodes. A node that has been placed in a pool is referred to as a “pool member”.At a minimum, the
nameis required. Additionally, thehostis required when creating new pool members.The module has several more options, all of which can be seen at this link.