Documentation

bigip_virtual_address - Manage LTM virtual addresses on a BIG-IP

New in version 2.4.

Synopsis

  • Manage LTM virtual addresses on a BIG-IP.

Requirements

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

  • f5-sdk >= 3.0.9
  • netaddr

Parameters

Parameter Choices/Defaults Comments
address
Virtual address. This value cannot be modified after it is set.
If you never created a virtual address, but did create virtual servers, then a virtual address for each virtual server was created automatically. The name of this virtual address is its IP address value.
arp_state
    Choices:
  • enabled
  • disabled
Specifies whether the system accepts ARP requests. When (disabled), specifies that the system does not accept ARP requests. Note that both ARP and ICMP Echo must be disabled in order for forwarding virtual servers using that virtual address to forward ICMP packets. If (enabled), then the packets are dropped.
auto_delete
    Choices:
  • enabled
  • disabled
Specifies whether the system automatically deletes the virtual address with the deletion of the last associated virtual server. When disabled, specifies that the system leaves the virtual address even when all associated virtual servers have been deleted. When creating the virtual address, the default value is enabled.
availability_calculation
(added in 2.6)
    Choices:
  • always
  • when_all_available
  • when_any_available
Specifies what routes of the virtual address the system advertises. When when_any_available, advertises the route when any virtual server is available. When when_all_available, advertises the route when all virtual servers are available. When (always), always advertises the route regardless of the virtual servers available.

aliases: advertise_route
connection_limit
Specifies the number of concurrent connections that the system allows on this virtual address.
icmp_echo
    Choices:
  • enabled
  • disabled
  • selective
Specifies how the systems sends responses to (ICMP) echo requests on a per-virtual address basis for enabling route advertisement. When enabled, the BIG-IP system intercepts ICMP echo request packets and responds to them directly. When disabled, the BIG-IP system passes ICMP echo requests through to the backend servers. When (selective), causes the BIG-IP system to internally enable or disable responses based on virtual server state; when_any_available, when_all_available, or C(always, regardless of the state of any virtual servers.
name
(added in 2.6)
Name of the virtual address.
If this parameter is not provided, then the value of address will be used.
netmask Default:
255.255.255.255
Netmask of the provided virtual address. This value cannot be modified after it is set.
partition
(added in 2.5)
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
provider
(added in 2.5)
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. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_SSH_KEYFILE will be used instead.
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 can omit this option if the environment variable F5_SERVER 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.
server_port Default:
443
The BIG-IP server port. You can omit this option if the environment variable F5_SERVER_PORT is set.
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
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.
transport
required
    Choices:
  • rest
  • cli ←
Configures the transport connection to use when connecting to the remote device.
route_advertisement
(added in 2.6)
    Choices:
  • disabled
  • enabled
  • always
  • selective
  • any
  • all
Specifies whether the system uses route advertisement for this virtual address.
When disabled, the system does not advertise routes for this virtual address.
The majority of these options are only supported on versions 13.0.0-HF1 or higher. On versions less than this, all choices expect disabled will translate to enabled.
When always, the BIG-IP system will always advertise the route for the virtual address, regardless of availability status. This requires an enabled virtual address.
When enabled, the BIG-IP system will advertise the route for the available virtual address, based on the calculation method in the availability calculation.
When disabled, the BIG-IP system will not advertise the route for the virtual address, regardless of the availability status.
When selective, you can also selectively enable ICMP echo responses, which causes the BIG-IP system to internally enable or disable responses based on virtual server state. Either any virtual server, all virtual servers, or always, regardless of the state of any virtual server.
When any, the BIG-IP system will advertise the route for the virtual address when any virtual server is available.
When all, the BIG-IP system will advertise the route for the virtual address when all virtual servers are available.
route_domain
(added in 2.6)
The route domain of the address that you want to use.
This value cannot be modified after it is set.
server
required
The BIG-IP host. You can omit this option if the environment variable F5_SERVER is set.
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
The virtual address state. If absent, an attempt to delete the virtual address will be made. This will only succeed if this virtual address is not in use by a virtual server. present creates the virtual address and enables it. If enabled, enable the virtual address if it exists. If disabled, create the virtual address if needed, and set state to disabled.
traffic_group
(added in 2.5)
The traffic group for the virtual address. When creating a new address, if this value is not specified, the default of /Common/traffic-group-1 will be used.
use_route_advertisement
bool
    Choices:
  • no
  • yes
Specifies whether the system uses route advertisement for this virtual address.
When disabled, the system does not advertise routes for this virtual address.
Deprecated. Use the route_advertisement parameter instead.
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.

Notes

Note

  • Requires the netaddr Python package on the host. This is as easy as pip install netaddr.
  • 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.

Examples

- name: Add virtual address
  bigip_virtual_address:
    server: lb.mydomain.net
    user: admin
    password: secret
    state: present
    partition: Common
    address: 10.10.10.10
  delegate_to: localhost

- name: Enable route advertisement on the virtual address
  bigip_virtual_address:
    server: lb.mydomain.net
    user: admin
    password: secret
    state: present
    address: 10.10.10.10
    use_route_advertisement: yes
  delegate_to: localhost

Return Values

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

Key Returned Description
address
int
created
The address of the virtual address.

Sample:
2345
arp_state
string
changed
The new way the virtual address handles ARP requests.

Sample:
disabled
auto_delete
string
changed
New setting for auto deleting virtual address.

Sample:
enabled
connection_limit
int
changed
The new connection limit of the virtual address.

Sample:
1000
icmp_echo
string
changed
New ICMP echo setting applied to virtual address.

Sample:
disabled
netmask
int
created
The netmask of the virtual address.

Sample:
2345
state
string
changed
The new state of the virtual address.

Sample:
disabled
use_route_advertisement
bool
changed
The new setting for whether to use route advertising or not.

Sample:
True


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Author

  • Tim Rupp (@caphrim007)

Hint

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