bigip_profile_persistence_cookie – Manage cookie persistence profiles on BIG-IP — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# bigip_profile_persistence_cookie – Manage cookie persistence profiles on BIG-IP

New in version 2.8.

- Synopsis

- Parameters

- Notes

- Examples

- Return Values

- Status

## Synopsis

- Manage cookie persistence profiles on BIG-IP.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
always_send boolean | Choices: no yes | Send the cookie persistence entry on every reply, even if the entry has previously been supplied to the client.
cookie_encryption string | Choices: disabled preferred required | Specifies the way in which the cookie encryption format is used. When `disabled`, generates the cookie format unencrypted. When `preferred`, generate an encrypted cookie, but accepts both encrypted and unencrypted formats. When `required`, cookie format must be encrypted.
cookie_method string | Choices: hash insert passive rewrite | Specifies the type of cookie processing that the system uses. When `hash`, specifies that the server provides the cookie, which the system then maps consistently to a specific node. This persistence type requires a `cookie_name` value. When `insert`, specifies that the system inserts server information, in the form of a cookie, into the header of the server response. When `passive`, specifies that the server provides the cookie, formatted with the correct server information and timeout. This persistence type requires a `cookie_name` value. When `rewrite`, specifies that the system intercepts the BIGipCookie header, sent from the server, and overwrites the name and value of that cookie.
cookie_name string |  | Specifies a unique name for the cookie.
description string |  | Description of the profile.
encrypt_cookie_pool_name boolean | Choices: no yes | Specifies whether the pool-name in the inserted BIG-IP default cookie should be encrypted.
encryption_passphrase string |  | Specifies a passphrase to be used for cookie encryption.
expiration dictionary added in 2.8 |  | Specifies the expiration time of the cookie. By default the system generates and uses session cookie. This cookie expires when the user session expires, that is when the browser is closed.
| days integer |  | Cookie expiration time in days, the value must be in range from `0` to `24855` days.
| hours integer |  | Cookie expiration time in hours, the value must be in the range from `0` to `23` hours.
| minutes integer |  | Cookie expiration time in minutes, the value must be in the range from `0` to `59` minutes.
| seconds integer | Default: 0 | Cookie expiration time in seconds, the value must be in the range from `0` to `59` seconds.
http_only boolean | Choices: no yes | Specifies whether the httponly attribute should be enabled or disabled for the inserted cookies.
match_across_pools boolean | Choices: no yes | When `yes`, specifies that the system can use any pool that contains this persistence record. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
match_across_services boolean | Choices: no yes | When `yes`, specifies that all persistent connections from a client IP address that go to the same virtual IP address also go to the same node. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
match_across_virtuals boolean | Choices: no yes | When `yes`, specifies that all persistent connections from the same client IP address go to the same node. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
name string / required |  | Specifies the name of the profile.
override_connection_limit boolean | Choices: no yes | When `yes`, specifies that the system allows you to specify that pool member connection limits will be overridden for persisted clients. Per-virtual connection limits remain hard limits and are not overridden.
parent string | Default: "cookie" | Specifies the profile from which this profile inherits settings. When creating a new profile, if this parameter is not specified, the default is the system-supplied `cookie` profile.
partition string | Default: "Common" | Device partition to manage resources on.
provider dictionary added in 2.5 |  | A dict object containing connection details.
| auth_provider string |  | Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices.
| 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 |  | 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`.
secure boolean | Choices: no yes | Specifies whether the secure attribute should be enabled or disabled for the inserted cookies.
state string | Choices: present ← absent | When `present`, ensures that the profile exists. When `absent`, ensures the profile is removed.
update_password string | Choices: always ← on_create | `always` will allow to update passphrases if the user chooses to do so. `on_create` will only set the passphrase for newly created profiles.

## 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 persistence cookie profile
      bigip_profile_persistence_cookie:
        name: foo
        provider:
          password: secret
          server: lb.mydomain.com
          user: admin
      delegate_to: localhost
    - name: Create a persistence cookie profile with expiration time
      bigip_profile_persistence_cookie:
        name: foo
        expiration:
          days: 7
          hours: 12
          minutes: 30
        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
--- | --- | ---
always_send boolean | changed | The new Always Send value.
cookie_encryption string | changed | The new Cookie Encryption type. Sample: preferred
cookie_method string | changed | The new Cookie Method. Sample: insert
cookie_name string | changed | The new Cookie Name value. Sample: cookie1
description string | changed | The new description. Sample: My description
encrypt_cookie_pool_name boolean | changed | The new Encrypt Cookie Pool Name value. Sample: True
expiration complex | changed | The expiration time of the cookie. Sample: hash/dictionary of values
| days integer | changed | Cookie expiration time in days. Sample: 125
| hours integer | changed | Cookie expiration time in hours. Sample: 22
| minutes integer | changed | Cookie expiration time in minutes. Sample: 58
| seconds integer | changed | Cookie expiration time in seconds. Sample: 20
http_only boolean | changed | The new HTTP Only value. Sample: True
match_across_pools boolean | changed | The new Match Across Pools value. Sample: True
match_across_services boolean | changed | The new Match Across Services value.
match_across_virtuals boolean | changed | The new Match Across Virtuals value. Sample: True
override_connection_limit boolean | changed | The new Override Connection Limit value.
parent string | changed | The parent profile. Sample: /Common/cookie
secure boolean | changed | The new Secure Cookie value.

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]

- This module is maintained by an Ansible Partner. [certified]

### Authors

- Tim Rupp (@caphrim007)

- Wojciech Wypior (@wojtek0806)

Hint

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