Exercise 1.3 - Adding a load balancing pool

Read this in other languages: uk English, japan 日本語.

Table of Contents


Demonstrate use of the BIG-IP pool module to configure a load balancing pool in BIG-IP device. A load balancing pool is a logical set of devices, such as web servers, that you group together to receive and process traffic.


Step 1:

Using VSCode create a new file called bigip-pool.yml by clicking the new file icon in the left pane.

picture of create file icon

Step 2:

Enter the following play definition into bigip-pool.yml:

- name: BIG-IP SETUP
  hosts: lb
  connection: local
  gather_facts: false

Do not exit the editor yet.

Step 3

Next, append the first task to above playbook. This task will use the bigip_pool module configure the two RHEL web servers as nodes on the BIG-IP F5 load balancer.

    - name: CREATE POOL
          server: "{{private_ip}}"
          user: "{{ansible_user}}"
          password: "{{ansible_password}}"
          server_port: 8443
          validate_certs: false
        name: "http_pool"
        lb_method: "round-robin"
        monitors: "/Common/http"
        monitor_type: "and_list"

Save the file and exit out of editor

Step 4

Run the playbook - Go back to the Terminal on VS Code server on the control host and execute the following:

[student1@ansible ~]$ ansible-navigator run bigip-pool.yml --mode stdout

Playbook Output

The output will look as follows.

[student1@ansible ~]$ ansible-navigator run bigip-pool.yml --mode stdout

PLAY [BIG-IP SETUP] ************************************************************

TASK [CREATE POOL] *************************************************************
changed: [f5]

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


The finished Ansible Playbook is provided here for an Answer key. Click here: bigip-pool.yml.

Verifying the Solution

Login to the F5 with your web browser to see what was configured. Grab the IP information for the F5 load balancer from the lab_inventory/hosts file, and type it in like so: https://X.X.X.X:8443/

Login information for the BIG-IP:

The load balancer pool can be found by navigating the menu on the left. Click on Local Traffic-> then click on Pools. f5pool

You have finished this exercise. Click here to return to the lab guide