• Blog
  • Ansible community forum
  • Documentation
Ansible Logo
Ansible Community Documentation
Ansible

Ansible getting started

  • Getting started with Ansible
  • Getting started with Execution Environments

Installation, Upgrade & Configuration

  • Installation Guide
  • Ansible Porting Guides

Using Ansible

  • Building Ansible inventories
  • Using Ansible command line tools
  • Using Ansible playbooks
  • Protecting sensitive data with Ansible vault
  • Using Ansible modules and plugins
  • Using Ansible collections
  • Using Ansible on Windows, BSD, and z/OS UNIX
  • Ansible tips and tricks

Contributing to Ansible

  • Ansible Community Guide
  • Ansible Collections Contributor Guide
  • ansible-core Contributors Guide
  • Advanced Contributor Guide
  • Ansible documentation style guide

Extending Ansible

  • Developer Guide

Common Ansible Scenarios

  • Legacy Public Cloud Guides

Network Automation

  • Network Getting Started
  • Network Advanced Topics
  • Network Developer Guide

Ansible Galaxy

  • Galaxy User Guide
  • Galaxy Developer Guide

Reference & Appendices

  • Collection Index
    • Collections in the Amazon Namespace
    • Collections in the Ansible Namespace
    • Collections in the Arista Namespace
    • Collections in the Awx Namespace
    • Collections in the Azure Namespace
    • Collections in the Check_point Namespace
    • Collections in the Chocolatey Namespace
    • Collections in the Cisco Namespace
    • Collections in the Cloud Namespace
    • Collections in the Cloudscale_ch Namespace
    • Collections in the Community Namespace
    • Collections in the Containers Namespace
    • Collections in the Cyberark Namespace
    • Collections in the Dellemc Namespace
    • Collections in the F5networks Namespace
      • F5Networks.F5_Modules
        • Description
        • Plugin Index
    • Collections in the Fortinet Namespace
    • Collections in the Frr Namespace
    • Collections in the Gluster Namespace
    • Collections in the Google Namespace
    • Collections in the Grafana Namespace
    • Collections in the Hetzner Namespace
    • Collections in the Hitachivantara Namespace
    • Collections in the Hpe Namespace
    • Collections in the Ibm Namespace
    • Collections in the Ieisystem Namespace
    • Collections in the Infinidat Namespace
    • Collections in the Infoblox Namespace
    • Collections in the Inspur Namespace
    • Collections in the Junipernetworks Namespace
    • Collections in the Kaytus Namespace
    • Collections in the Kubernetes Namespace
    • Collections in the Kubevirt Namespace
    • Collections in the Lowlydba Namespace
    • Collections in the Mellanox Namespace
    • Collections in the Microsoft Namespace
    • Collections in the Netapp Namespace
    • Collections in the Netapp_eseries Namespace
    • Collections in the Netbox Namespace
    • Collections in the Ngine_io Namespace
    • Collections in the Openstack Namespace
    • Collections in the Openvswitch Namespace
    • Collections in the Ovirt Namespace
    • Collections in the Purestorage Namespace
    • Collections in the Sensu Namespace
    • Collections in the Servicenow Namespace
    • Collections in the Splunk Namespace
    • Collections in the T_systems_mms Namespace
    • Collections in the Telekom_mms Namespace
    • Collections in the Theforeman Namespace
    • Collections in the Vmware Namespace
    • Collections in the Vultr Namespace
    • Collections in the Vyos Namespace
    • Collections in the Wti Namespace
  • Indexes of all modules and plugins
  • Playbook Keywords
  • Return Values
  • Ansible Configuration Settings
  • Controlling how Ansible behaves: precedence rules
  • YAML Syntax
  • Python 3 Support
  • Interpreter Discovery
  • Releases and maintenance
  • Testing Strategies
  • Sanity Tests
  • Frequently Asked Questions
  • Glossary
  • Ansible Reference: Module Utilities
  • Special Variables
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • Logging Ansible output

Roadmaps

  • Ansible Roadmap
  • ansible-core Roadmaps




Ansible
  • Collection Index
  • Collections in the F5networks Namespace
  • F5Networks.F5_Modules
  • f5networks.f5_modules.bigip_profile_persistence_cookie module – Manage cookie persistence profiles on BIG-IP


f5networks.f5_modules.bigip_profile_persistence_cookie module – Manage cookie persistence profiles on BIG-IP

Note

This module is part of the f5networks.f5_modules collection (version 1.35.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_profile_persistence_cookie.

New in f5networks.f5_modules 1.0.0

  • Synopsis

  • Parameters

  • Notes

  • Examples

  • Return Values

Synopsis

  • Manage cookie persistence profiles on BIG-IP system.

Parameters

Parameter

Comments

always_send

boolean

Sends the cookie persistence entry on every reply, even if the entry has previously been supplied to the client.

Choices:

  • false

  • true

cookie_encryption

string

Specifies the way in which the cookie encryption format is used.

When disabled, generates the cookie format unencrypted.

When preferred, generates an encrypted cookie, but accepts both encrypted and unencrypted formats.

When required, cookie format must be encrypted.

Choices:

  • "disabled"

  • "preferred"

  • "required"

cookie_method

string

Specifies the type of cookie processing the system uses.

When hash, specifies 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 the system inserts server information, in the form of a cookie, into the header of the server response.

When passive, specifies the server provides the cookie, formatted with the correct server information and timeout. This persistence type requires a cookie_name value.

When rewrite, specifies the system intercepts the BIGipCookie header, sent from the server, and overwrites the name and value of that cookie.

Choices:

  • "hash"

  • "insert"

  • "passive"

  • "rewrite"

cookie_name

string

Specifies a unique name for the cookie.

description

string

Description of the profile.

encrypt_cookie_pool_name

boolean

Specifies whether the pool-name in the inserted BIG-IP default cookie should be encrypted.

Choices:

  • false

  • true

encryption_passphrase

string

Specifies a passphrase to be used for cookie encryption.

expiration

dictionary

Specifies the expiration time of the cookie. By default the system generates and uses a session cookie. This cookie expires when the user session expires (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

Cookie expiration time in seconds. The value must be in the range from 0 to 59 seconds.

Default: 0

http_only

boolean

Specifies whether the httponly attribute should be enabled or disabled for the inserted cookies.

Choices:

  • false

  • true

match_across_pools

boolean

When true, specifies 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.

Choices:

  • false

  • true

match_across_services

boolean

When true, specifies 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.

Choices:

  • false

  • true

match_across_virtuals

boolean

When true, specifies 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.

Choices:

  • false

  • true

name

string / required

Specifies the name of the profile.

override_connection_limit

boolean

When true, specifies 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.

Choices:

  • false

  • true

parent

string

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.

Default: "cookie"

partition

string

Device partition to manage resources on.

Default: "Common"

provider

dictionary

added in f5networks.f5_modules 1.0.0

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.

no_f5_teem

boolean

If yes, TEEM telemetry data is not sent to F5.

You may omit this option by setting the environment variable F5_TELEMETRY_OFF.

Previously used variable F5_TEEM is deprecated as its name was confusing.

Choices:

  • false ← (default)

  • true

password

aliases: pass, pwd

string / required

The password for the user account used to connect to the BIG-IP or the BIG-IQ.

You may omit this option by setting the environment variable F5_PASSWORD.

server

string / required

The BIG-IP host or the BIG-IQ host.

You may omit this option by setting the environment variable F5_SERVER.

server_port

integer

The BIG-IP server port.

You may omit this option by setting the environment variable F5_SERVER_PORT.

Default: 443

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

Configures the transport connection to use when connecting to the remote device.

Choices:

  • "rest" ← (default)

user

string / required

The username to connect to the BIG-IP or the BIG-IQ. This user must have administrative privileges on the device.

You may omit this option by setting the environment variable F5_USER.

validate_certs

boolean

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.

Choices:

  • false

  • true ← (default)

secure

boolean

Specifies whether the secure attribute should be enabled or disabled for the inserted cookies.

Choices:

  • false

  • true

state

string

When present, ensures the profile exists.

When absent, ensures the profile is removed.

Choices:

  • "present" ← (default)

  • "absent"

update_password

string

always will allow updating passphrases if the user chooses to do so. on_create will only set the passphrase for newly created profiles.

Choices:

  • "always" ← (default)

  • "on_create"

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 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

Description

always_send

boolean

The new Always Send value.

Returned: changed

Sample: false

cookie_encryption

string

The new Cookie Encryption type.

Returned: changed

Sample: "preferred"

cookie_method

string

The new Cookie Method.

Returned: changed

Sample: "insert"

cookie_name

string

The new Cookie Name value.

Returned: changed

Sample: "cookie1"

description

string

The new description.

Returned: changed

Sample: "My description"

encrypt_cookie_pool_name

boolean

The new Encrypt Cookie Pool Name value.

Returned: changed

Sample: true

expiration

complex

The expiration time of the cookie.

Returned: changed

Sample: "hash/dictionary of values"

days

integer

Cookie expiration time in days.

Returned: changed

Sample: 125

hours

integer

Cookie expiration time in hours.

Returned: changed

Sample: 22

minutes

integer

Cookie expiration time in minutes.

Returned: changed

Sample: 58

seconds

integer

Cookie expiration time in seconds.

Returned: changed

Sample: 20

http_only

boolean

The new HTTP Only value.

Returned: changed

Sample: true

match_across_pools

boolean

The new Match Across Pools value.

Returned: changed

Sample: true

match_across_services

boolean

The new Match Across Services value.

Returned: changed

Sample: false

match_across_virtuals

boolean

The new Match Across Virtuals value.

Returned: changed

Sample: true

override_connection_limit

boolean

The new Override Connection Limit value.

Returned: changed

Sample: false

parent

string

The parent profile.

Returned: changed

Sample: "/Common/cookie"

secure

boolean

The new Secure Cookie value.

Returned: changed

Sample: false

Authors

  • Tim Rupp (@caphrim007)

  • Wojciech Wypior (@wojtek0806)

Collection links

  • Issue Tracker
  • Homepage
  • Repository (Sources)
Previous Next

© Copyright Ansible project contributors. Last updated on May 06, 2025.