f5networks.f5_modules.bigip_selfip module – Manage Self-IPs on a BIG-IP system
Note
This module is part of the f5networks.f5_modules collection (version 1.25.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install f5networks.f5\_modules
.
To use it in a playbook, specify: f5networks.f5_modules.bigip_selfip
.
New in f5networks.f5_modules 1.0.0
Synopsis
Manage Self-IP addresses on a BIG-IP system.
Parameters
Parameter |
Comments |
---|---|
The IP addresses for the new self IP. This value is ignored upon update as addresses themselves cannot be changed after they are created. This value is required when creating new self IPs. |
|
Configure port lockdown for the self IP. By default, the self IP has a “default deny” policy. This can be changed to allow TCP and UDP ports, as well as specific protocols. This list should contain |
|
Description of the traffic selector. |
|
Specifies an AFM policy to attach to Self IP. |
|
The name of the self IP to create. If this parameter is not specified, it defaults to the value supplied in the |
|
The netmask for the self IP. When creating a new self IP, this value is required. |
|
Device partition to manage resources on. You can set different partitions for self IPs, but the address used may not match any other address used by a self IP. Thus, self IPs are not isolated by partitions as other resources on a BIG-IP are. Default: |
|
A dict object containing connection details. |
|
Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices. |
|
If You may omit this option by setting the environment variable Previously used variable Choices:
|
|
The password for the user account used to connect to the BIG-IP. You may omit this option by setting the environment variable |
|
The BIG-IP host. You may omit this option by setting the environment variable |
|
The BIG-IP server port. You may omit this option by setting the environment variable Default: |
|
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. |
|
Configures the transport connection to use when connecting to the remote device. Choices:
|
|
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 |
|
If You may omit this option by setting the environment variable Choices:
|
|
The route domain id of the system. When creating a new self IP, if this value is not specified, the default value is This value cannot be changed after it is set. |
|
When When Choices:
|
|
The traffic group for the self IP addresses in an active-active, redundant load balancer configuration. When creating a new self IP, if this value is not specified, the default is |
|
The VLAN for the new self IPs. When creating a new self IP, this value is required. |
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 f5networks.f5_modules.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 Self IP
bigip_selfip:
address: 10.10.10.10
name: self1
netmask: 255.255.255.0
vlan: vlan1
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Create Self IP with a Route Domain
bigip_selfip:
name: self1
address: 10.10.10.10
netmask: 255.255.255.0
vlan: vlan1
route_domain: 10
allow_service: default
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Delete Self IP
bigip_selfip:
name: self1
state: absent
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Allow management web UI to be accessed on this Self IP
bigip_selfip:
name: self1
state: absent
allow_service:
- tcp:443
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Allow HTTPS and SSH access to this Self IP
bigip_selfip:
name: self1
state: absent
allow_service:
- tcp:443
- tcp:22
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Allow all services access to this Self IP
bigip_selfip:
name: self1
state: absent
allow_service:
- all
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Allow only GRE and IGMP protocols access to this Self IP
bigip_selfip:
name: self1
state: absent
allow_service:
- gre:0
- igmp:0
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Allow all TCP, but no other protocols access to this Self IP
bigip_selfip:
name: self1
state: absent
allow_service:
- tcp:0
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The address for the self IP. Returned: changed Sample: |
|
Services that are allowed via this self IP. Returned: changed Sample: |
|
Specifies an AFM policy to be attached to the self IP. Returned: changed Sample: |
|
The name of the self IP. Returned: created Sample: |
|
The netmask of the self IP. Returned: changed Sample: |
|
The traffic group of which the self IP is a member. Returned: changed Sample: |
|
The VLAN set on the self IP. Returned: changed Sample: |