bigip_ipsec_policy – Manage IPSec policies on a BIG-IP

New in version 2.8.

Synopsis

  • Manage IPSec policies on a BIG-IP.

Parameters

Parameter Choices/Defaults Comments
auth_algorithm
string
    Choices:
  • sha1
  • sha256
  • sha384
  • sha512
  • aes-gcm128
  • aes-gcm192
  • aes-gcm256
  • aes-gmac128
  • aes-gmac192
  • aes-gmac256
Specifies the algorithm to use for IKE authentication.
description
string
Description of the policy
encrypt_algorithm
string
    Choices:
  • none
  • 3des
  • aes128
  • aes192
  • aes256
  • aes-gmac256
  • aes-gmac192
  • aes-gmac128
  • aes-gcm256
  • aes-gcm192
  • aes-gcm256
  • aes-gcm128
Specifies the algorithm to use for IKE encryption.
ipcomp
string
    Choices:
  • none
  • null
  • deflate
Specifies whether to use IPComp encapsulation.
When none, specifies that IPComp is disabled.
When deflate, specifies that IPComp is enabled and uses the Deflate compression algorithm.
kb_lifetime
integer
Specifies the length of time, in kilobytes, before the IKE security association expires.
lifetime
integer
Specifies the length of time, in minutes, before the IKE security association expires.
mode
string
    Choices:
  • transport
  • interface
  • isession
  • tunnel
Specifies the processing mode.
When transport, specifies a mode that encapsulates only the payload (adding an ESP header, trailer, and authentication tag).
When tunnel, specifies a mode that includes encapsulation of the header as well as the payload (adding a new IP header, in addition to adding an ESP header, trailer, and authentication tag). If you select this option, you must also provide IP addresses for the local and remote endpoints of the IPsec tunnel.
When isession, specifies the use of iSession over an IPsec tunnel. To use this option, you must also configure the iSession endpoints with IPsec in the Acceleration section of the user interface.
When interface, specifies that the IPsec policy can be used in the tunnel profile for network interfaces.
name
string / required
Specifies the name of the IPSec policy.
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
perfect_forward_secrecy
string
    Choices:
  • none
  • modp768
  • modp1024
  • modp1536
  • modp2048
  • modp3072
  • modp4096
  • modp6144
  • modp8192
Specifies the Diffie-Hellman group to use for IKE Phase 2 negotiation.
protocol
string
    Choices:
  • esp
  • ah
Specifies the IPsec protocol
Options include ESP (Encapsulating Security Protocol) or AH (Authentication Header).
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.
route_domain
integer
Specifies the route domain, when interface is selected for the mode setting.
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 resource exists.
When absent, ensures the resource is removed.
tunnel_local_address
string
Specifies the local endpoint IP address of the IPsec tunnel.
This parameter is only valid when mode is tunnel.
tunnel_remote_address
string
Specifies the remote endpoint IP address of the IPsec tunnel.
This parameter is only valid when mode is tunnel.
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 IPSec policy
  bigip_ipsec_policy:
    name: policy1
    mode: tunnel
    tunnel_local_address: 1.1.1.1
    tunnel_remote_address: 2.2.2.
    auth_algorithm: sha1
    encrypt_algorithm: 3des
    protocol: esp
    perfect_forward_secrecy: modp1024
    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 Returned Description
auth_algorithm
string
changed
The new IKE Phase 2 Authentication Algorithm value.

Sample:
sha512
description
string
changed
The new description value.

Sample:
My policy
encrypt_algorithm
string
changed
The new IKE Phase 2 Encryption Algorithm value.

Sample:
aes256
ipcomp
string
changed
The new IKE Phase 2 IPComp value.

Sample:
deflate
kb_lifetime
integer
changed
The new IKE Phase 2 KB Lifetime value.

lifetime
integer
changed
The new IKE Phase 2 Lifetime value.

Sample:
1440
mode
string
changed
The new Mode value.

Sample:
tunnel
perfect_forward_secrecy
string
changed
The new IKE Phase 2 Perfect Forward Secrecy value.

Sample:
modp2048
protocol
string
changed
The new IPsec Protocol value.

Sample:
ah
route_domain
integer
changed
The new Route Domain value when in Tunnel mode.

Sample:
2
tunnel_local_address
string
changed
The new Tunnel Local Address value.

Sample:
1.2.2.1
tunnel_remote_address
string
changed
The new Tunnel Remote Address value.

Sample:
2.1.1.2


Status

Authors

  • Tim Rupp (@caphrim007)

Hint

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