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.9

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_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.
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.
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
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.
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.
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.
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.
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.
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.
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 can omit this option if the environment variable F5_PASSWORD is set.

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)
A dict object containing connection details.
password
required
The password for the user account used to connect to the BIG-IP. You can omit this option if the environment variable F5_PASSWORD is set.

aliases: pass, pwd
server
required
The BIG-IP host. You can omit this option if the environment variable F5_SERVER is set.
server_port Default:
443
The BIG-IP server port. You can omit this option if the environment variable F5_SERVER_PORT is set.
user
required
The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You can omit this option if the environment variable F5_USER is set.
validate_certs
bool
    Choices:
  • no
  • yes
If no, SSL certificates will not be validated. Use this only on personally controlled sites using self-signed certificates. You can omit this option if the environment variable F5_VALIDATE_CERTS is set.
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.
ssh_keyfile
Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for cli transports. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_SSH_KEYFILE will be used instead.
transport
required
    Choices:
  • rest
  • cli
Configures the transport connection to use when connecting to the remote device.
server
required
The BIG-IP host. You can omit this option if the environment variable F5_SERVER is set.
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 can omit this option if the environment variable F5_SERVER_PORT is set.
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 can omit this option if the environment variable F5_USER is set.
validate_certs
bool

(added in 2.0)
    Choices:
  • no
  • yes
If no, SSL certificates will not be validated. Use this only on personally controlled sites using self-signed certificates. You can omit this option if the environment variable F5_VALIDATE_CERTS is set.
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

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 community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

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

Author

  • Tim Rupp (@caphrim007)

Hint

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

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.6/modules/bigip_gtm_virtual_server_module.html