bigip_device_traffic_group – Manages traffic groups on BIG-IP

New in version 2.5.

Synopsis

  • Supports managing traffic groups and their attributes on a BIG-IP.

Aliases: bigip_traffic_group

Parameters

Parameter Choices/Defaults Comments
auto_failback
boolean
added in 2.8
    Choices:
  • no
  • yes
Specifies whether the traffic group fails back to the initial device specified in ha_order.
auto_failback_time
integer
added in 2.8
Specifies the number of seconds the system delays before failing back to the initial device specified in ha_order.
The correct value range is 0 - 300 inclusive.
ha_group
string
added in 2.8
Specifies a configured HA group to be associated with the traffic group.
Once you create an HA group on a device and associate the HA group with a traffic group, you must create an HA group and associate it with that same traffic group on every device in the device group.
To disable an HA group failover method , specify an empty string value ("") to this parameter.
Disabling HA group will revert the device back to using Load Aware method as it is the default, unless ha_order setting is also configured.
The auto_failback and auto_failback_time are not compatible with ha_group.
ha_load_factor
integer
added in 2.8
The value of the load the traffic-group presents the system relative to other traffic groups.
This parameter only takes effect when Load Aware failover method is in use.
The correct value range is 1 - 1000 inclusive.
ha_order
list
added in 2.8
Specifies order in which you would like to assign devices for failover.
If you configure this setting, you must configure the setting on every traffic group in the device group.
The values should be device names of the devices that belong to the failover group configured beforehand.
The order in which the devices are placed as arguments to this parameter, determines their HA order on the device, in other words changing the order of the same elements will cause a change on the unit.
To disable an HA order failover method , specify an empty string value ("") to this parameter.
Disabling HA order will revert the device back to using Load Aware method as it is the default, unless ha_group setting is also configured.
Device names will be prepended by a partition by the module, so you can provide either the full path format name /Common/bigip1 or just the name string bigip1.
mac_address
string
added in 2.6
Specifies the floating Media Access Control (MAC) address associated with the floating IP addresses defined for a traffic group.
Primarily, a MAC masquerade address minimizes ARP communications or dropped packets as a result of failover.
A MAC masquerade address ensures that any traffic destined for a specific traffic group reaches an available device after failover, which happens because along with the traffic group, the MAC masquerade address floats to the available device.
Without a MAC masquerade address, the sending host must learn the MAC address for a newly-active device, either by sending an ARP request or by relying on the gratuitous ARP from the newly-active device.
To unset the MAC address, specify an empty value ("") to this parameter.
name
string / required
The name of the traffic group.
partition
string
Default:
"Common"
Device partition to manage resources on.
password
string / 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
provider
dictionary
added in 2.5
A dict object containing connection details.
password
string / 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
string / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_port
integer
Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
ssh_keyfile
path
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
integer
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
string
    Choices:
  • cli
  • rest
Configures the transport connection to use when connecting to the remote device.
user
string / 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
string / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_port
integer
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
string
    Choices:
  • present
  • absent
When present, ensures that the traffic group exists.
When absent, ensures the traffic group is removed.
user
string / 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.

Notes

Note

  • For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
  • 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: Create a traffic group
  bigip_device_traffic_group:
    name: foo1
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Create a traffic group with ha_group failover
  bigip_device_traffic_group:
    name: foo2
    state: present
    ha_group: foo_HA_grp
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Create a traffic group with ha_order failover
  bigip_device_traffic_group:
    name: foo3
    state: present
    ha_order:
      - /Common/bigip1.lab.local
      - /Common/bigip2.lab.local
    auto_failback: yes
    auto_failback_time: 40
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Change traffic group ha_order to ha_group
  bigip_device_traffic_group:
    name: foo3
    state: present
    ha_group: foo_HA_grp
    ha_order: ""
    auto_failback: no
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Remove traffic group
  bigip_device_traffic_group:
    name: foo
    state: absent
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

Return Values

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

Key Returned Description
auto_failback
boolean
changed
Specifies whether the traffic group fails back to the initial device specified in ha_order

Sample:
True
auto_failback_time
integer
changed
Specifies the number of seconds the system delays before failing back

Sample:
60
ha_group
string
changed
The configured HA group associated with traffic group

Sample:
foo_HA_grp
ha_load_factor
integer
changed
The value of the load the traffic-group presents the system relative to other traffic groups

Sample:
20
ha_order
list
changed
Specifies the order in which the devices will failover

Sample:
['/Common/bigip1', '/Common/bigip2']
mac_address
string
changed
The MAC masquerade address

Sample:
02:01:d7:93:35:08


Status

Authors

  • Tim Rupp (@caphrim007)
  • Wojciech Wypior (@wojtek0806)

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.8/modules/bigip_device_traffic_group_module.html