bigip_node - Manages F5 BIG-IP LTM nodes

New in version 1.4.

Synopsis

  • Manages F5 BIG-IP LTM nodes.

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.2)
IP address of the node. This can be either IPv4 or IPv6. When creating a new node, one of either address or fqdn must be provided. This parameter cannot be updated after it is set.

aliases: ip, host
description
Specifies descriptive text that identifies the node.
fqdn
(added in 2.5)
FQDN name of the node. This can be any name that is a valid RFC 1123 DNS name. Therefore, the only characters that can be used are "A" to "Z", "a" to "z", "0" to "9", the hyphen ("-") and the period (".").
FQDN names must include at lease one period; delineating the host from the domain. ex. host.domain.
FQDN names must end with a letter or a number.
When creating a new node, one of either address or fqdn must be provided. This parameter cannot be updated after it is set.

aliases: hostname
monitor_type
(added in 1.3)
    Choices:
  • and_list
  • m_of_n
  • single
Monitor rule type when monitors is specified. When creating a new pool, if this value is not specified, the default of 'and_list' will be used.
Both single and and_list are functionally identical since BIG-IP considers all monitors as "a list". BIG=IP either has a list of many, or it has a list of one. Where they differ is in the extra guards that single provides; namely that it only allows a single monitor.
monitors
(added in 2.2)
Specifies the health monitors that the system currently uses to monitor this node.
name
required
Specifies the name of the node.
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)
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. 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
    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.
quorum
(added in 2.2)
Monitor quorum value when monitor_type is m_of_n.
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
  • offline
Specifies the current state of the node. enabled (All traffic allowed), specifies that system sends traffic to this node regardless of the node's state. disabled (Only persistent or active connections allowed), Specifies that the node can handle only persistent or active connections. offline (Only active connections allowed), Specifies that the node can handle only active connections. In all cases except absent, the node will be created if it does not yet exist.
Be particularly careful about changing the status of a node whose FQDN cannot be resolved. These situations disable your ability to change their state to disabled or offline. They will remain in an *Unavailable - Enabled* state.
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
(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 node
  bigip_node:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: present
    partition: Common
    host: 10.20.30.40
    name: 10.20.30.40
  delegate_to: localhost

- name: Add node with a single 'ping' monitor
  bigip_node:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: present
    partition: Common
    host: 10.20.30.40
    name: mytestserver
    monitors:
      - /Common/icmp
  delegate_to: localhost

- name: Modify node description
  bigip_node:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: present
    partition: Common
    name: 10.20.30.40
    description: Our best server yet
  delegate_to: localhost

- name: Delete node
  bigip_node:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: absent
    partition: Common
    name: 10.20.30.40
  delegate_to: localhost

- name: Force node offline
  bigip_node:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: disabled
    partition: Common
    name: 10.20.30.40
  delegate_to: localhost

- name: Add node by their FQDN
  bigip_node:
    server: lb.mydomain.com
    user: admin
    password: secret
    state: present
    partition: Common
    fqdn: foo.bar.com
    name: 10.20.30.40
  delegate_to: localhost

Return Values

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

Key Returned Description
description
string
changed and success
Changed value for the description of the node.

Sample:
E-Commerce webserver in ORD
monitor_type
string
changed and success
Changed value for the monitor_type of the node.

Sample:
m_of_n
monitors
list
changed and success
Changed list of monitors for the node.

Sample:
['icmp', 'tcp_echo']
quorum
int
changed and success
Changed value for the quorum of the node.

Sample:
1
session
string
changed and success
Changed value for the internal session of the node.

Sample:
user-disabled
state
string
changed and success
Changed value for the internal state of the node.

Sample:
m_of_n


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.

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