bigip_gtm_virtual_server - Manages F5 BIG-IP GTM virtual servers

New in version 2.6.

Synopsis

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.
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.
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.
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.
packets_enabled
bool
    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.
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.
bits_enabled
bool
    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.
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.
connections_enabled
bool
    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.
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.
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.
server
required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
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.
server_port Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
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
validate_certs
bool
    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.
transport
required
    Choices:
  • rest
  • cli ←
Configures the transport connection to use when connecting to the remote device.
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
bool

(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.
virtual_server
required
Virtual server to depend on.
server
required
Server which the dependant virtual server is part of.

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
dict
changed
The new availability requirement configurations for the resource.

Sample:
{'type': 'all'}
limits
dict
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
int
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
int
changed
The new translation address of the resource.

Sample:
500
translation_port
int
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 flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.

Maintenance

This module is flagged as certified which means that it is maintained by an Ansible Partner. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by an Ansible Partner, see here.

Author

  • Tim Rupp (@caphrim007)

Hint

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