2.1.4. Create a Virtual Server

Create a virtual server and assign pool

You need to assign newly created nodes to a pool. Use the bigip_virtual_server module.

  1. Create a playbook vs.yaml.

    • Type nano playbooks/vs.yaml

    • Type the following into the playbooks/vs.yaml file.

      ../../_images/image021.png
    • Ctrl x to save file.

  2. Run this playbook.

    • Type ansible-playbook playbooks/vs.yaml

    If successful, you should see similar results

    ../../_images/image022.png
  3. Verify BIG-IP results.

    • Select Local Traffic -> Virtual Servers -> Virtual Server List
    ../../_images/image023.png
    • Open browser to http://10.1.10.10.

Note

The bigip_virtual_server module can configure a number of attributes for virtual server. At a minimum, the name is required.

This module is idempotent. Therefore, you can run it over and over again and so-long as no settings have been changed, this module will report no changes.

The module has several more options, all of which can be seen at this link.