Documentation

bigip_gtm_virtual_server – Manages F5 BIG-IP GTM virtual servers

New in version 2.6.

Synopsis

  • Manages F5 BIG-IP GTM virtual servers. A GTM server can have many virtual servers associated with it. They are arranged in much the same way that pool members are to pools.

Requirements

The below requirements are needed on the host that executes this module.

  • f5-sdk >= 3.0.16

Parameters

Parameter Choices/Defaults Comments
address
-
added in 2.6
Specifies the IP Address of the virtual server.
When creating a new GTM virtual server, this parameter is required.
availability_requirements
-
added in 2.6
Specifies, if you activate more than one health monitor, the number of health monitors that must receive successful responses in order for the link to be considered available.
at_least
-
Specifies the minimum number of active health monitors that must be successful before the link is considered up.
This parameter is only relevant when a type of at_least is used.
This parameter will be ignored if a type of either all or require is used.
number_of_probers
-
Specifies the number of probers that should be used when running probes.
When creating a new virtual server, if this parameter is specified, then the number_of_probes parameter must also be specified.
The value of this parameter should always be higher than, or equal to, the value of number_of_probers.
This parameter is only relevant when a type of require is used.
This parameter will be ignored if a type of either all or at_least is used.
number_of_probes
-
Specifies the minimum number of probes that must succeed for this server to be declared up.
When creating a new virtual server, if this parameter is specified, then the number_of_probers parameter must also be specified.
The value of this parameter should always be lower than, or equal to, the value of number_of_probers.
This parameter is only relevant when a type of require is used.
This parameter will be ignored if a type of either all or at_least is used.
type
-
    Choices:
  • all
  • at_least
  • require
Monitor rule type when monitors is specified.
When creating a new virtual, if this value is not specified, the default of 'all' will be used.
limits
-
added in 2.6
Specifies resource thresholds or limit requirements at the server level.
When you enable one or more limit settings, the system then uses that data to take servers in and out of service.
You can define limits for any or all of the limit settings. However, when a server does not meet the resource threshold limit requirement, the system marks the entire server as unavailable and directs load-balancing traffic to another resource.
The limit settings available depend on the type of server.
bits_enabled
boolean
    Choices:
  • no
  • yes
Whether the bits limit is enabled or not.
This parameter allows you to switch on or off the effect of the limit.
bits_limit
-
Specifies the maximum allowable data throughput rate, in bits per second, for the virtual servers on the server.
If the network traffic volume exceeds this limit, the system marks the server as unavailable.
connections_enabled
boolean
    Choices:
  • no
  • yes
Whether the current connections limit is enabled or not.
This parameter allows you to switch on or off the effect of the limit.
connections_limit
-
Specifies the maximum number of concurrent connections, combined, for all of the virtual servers on the server.
If the connections exceed this limit, the system marks the server as unavailable.
packets_enabled
boolean
    Choices:
  • no
  • yes
Whether the packets limit is enabled or not.
This parameter allows you to switch on or off the effect of the limit.
packets_limit
-
Specifies the maximum allowable data transfer rate, in packets per second, for the virtual servers on the server.
If the network traffic volume exceeds this limit, the system marks the server as unavailable.
link
-
added in 2.6
Specifies a link to assign to the server or virtual server.
monitors
-
added in 2.6
Specifies the health monitors that the system currently uses to monitor this resource.
When availability_requirements.type is require, you may only have a single monitor in the monitors list.
name
-
added in 2.6
Specifies the name of the virtual server.
partition
-
added in 2.6
Default:
Common
Device partition to manage resources on.
password
- / required
The password for the user account used to connect to the BIG-IP.
You may omit this option by setting the environment variable F5_PASSWORD.

aliases: pass, pwd
port
-
Specifies the service port number for the virtual server or pool member. For example, the HTTP service is typically port 80.
To specify all ports, use an *.
When creating a new GTM virtual server, if this parameter is not specified, a default of * will be used.
provider
-
added in 2.5
Default:
None
A dict object containing connection details.
password
- / required
The password for the user account used to connect to the BIG-IP.
You may omit this option by setting the environment variable F5_PASSWORD.

aliases: pass, pwd
server
- / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_port
-
Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
ssh_keyfile
-
Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for cli transports.
You may omit this option by setting the environment variable ANSIBLE_NET_SSH_KEYFILE.
timeout
-
Default:
10
Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.
transport
- / required
    Choices:
  • rest
  • cli ←
Configures the transport connection to use when connecting to the remote device.
user
- / required
The username to connect to the BIG-IP with. This user must have administrative privileges on the device.
You may omit this option by setting the environment variable F5_USER.
validate_certs
boolean
    Choices:
  • no
  • yes ←
If no, SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates.
You may omit this option by setting the environment variable F5_VALIDATE_CERTS.
server
- / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_name
-
added in 2.6
Specifies the name of the server that the virtual server is associated with.
server_port
-
added in 2.2
Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
state
-
    Choices:
  • present ←
  • absent
  • enabled
  • disabled
When present, ensures that the resource exists.
When absent, ensures the resource is removed.
translation_address
-
added in 2.6
Specifies the translation IP address for the virtual server.
To unset this parameter, provide an empty string ("") as a value.
When creating a new GTM virtual server, if this parameter is not specified, a default of :: will be used.
translation_port
-
added in 2.6
Specifies the translation port number or service name for the virtual server.
To specify all ports, use an *.
When creating a new GTM virtual server, if this parameter is not specified, a default of * will be used.
user
- / required
The username to connect to the BIG-IP with. This user must have administrative privileges on the device.
You may omit this option by setting the environment variable F5_USER.
validate_certs
boolean
added in 2.0
    Choices:
  • no
  • yes ←
If no, SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates.
You may omit this option by setting the environment variable F5_VALIDATE_CERTS.
virtual_server_dependencies
-
added in 2.6
Specifies the virtual servers on which the current virtual server depends.
If any of the specified servers are unavailable, the current virtual server is also listed as unavailable.
server
- / required
Server which the dependant virtual server is part of.
virtual_server
- / required
Virtual server to depend on.

Notes

Note

  • For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
  • Requires the f5-sdk Python package on the host. This is as easy as pip install f5-sdk.
  • Requires BIG-IP software version >= 12.
  • The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the bigip_config module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.

Examples

- name: Enable virtual server
  bigip_gtm_virtual_server:
    server: lb.mydomain.com
    user: admin
    password: secret
    server_name: server1
    name: my-virtual-server
    state: enabled
  delegate_to: localhost

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
address
string
changed
The new address of the resource.

Sample:
1.2.3.4
availability_requirements
dictionary
changed
The new availability requirement configurations for the resource.

Sample:
{'type': 'all'}
limits
dictionary
changed
The new limit configurations for the resource.

Sample:
{'bits_enabled': True, 'bits_limit': 100}
link
string
changed
The new link value for the resource.

Sample:
/Common/my-link
monitors
list
changed
The new list of monitors for the resource.

Sample:
['/Common/monitor1', '/Common/monitor2']
port
integer
changed
The new port of the resource.

Sample:
500
server_name
string
changed
The server name associated with the virtual server.

Sample:
/Common/my-gtm-server
translation_address
integer
changed
The new translation address of the resource.

Sample:
500
translation_port
integer
changed
The new translation port of the resource.

Sample:
500
virtual_server_dependencies
list
changed
The new list of virtual server dependencies for the resource

Sample:
['/Common/vs1', '/Common/vs2']


Status

  • This module is guaranteed to have no backward incompatible interface changes going forward. [stableinterface]
  • This module is maintained by an Ansible Partner. [certified]

Authors

  • Tim Rupp (@caphrim007)

Hint

If you notice any issues in this documentation you can edit this document to improve it.