community.general.redis (8.5.0) — cache

Use Redis DB for cache

Authors: Unknown (!UNKNOWN)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This cache uses JSON formatted, per host records saved in Redis.


Requirements

Inputs

    
_uri:
    description:
    - A colon separated string of connection information for Redis.
    - The format is V(host:port:db:password), for example V(localhost:6379:0:changeme).
    - To use encryption in transit, prefix the connection with V(tls://), as in V(tls://localhost:6379:0:changeme).
    - To use redis sentinel, use separator V(;), for example V(localhost:26379;localhost:26379;0:changeme).
      Requires redis>=2.9.0.
    env:
    - name: ANSIBLE_CACHE_PLUGIN_CONNECTION
    ini:
    - key: fact_caching_connection
      section: defaults
    required: true

_prefix:
    default: ansible_facts
    description: User defined prefix to use when creating the DB entries
    env:
    - name: ANSIBLE_CACHE_PLUGIN_PREFIX
    ini:
    - key: fact_caching_prefix
      section: defaults

_timeout:
    default: 86400
    description: Expiration timeout in seconds for the cache plugin data. Set to 0 to
      never expire
    env:
    - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
    ini:
    - key: fact_caching_timeout
      section: defaults
    type: integer

_keyset_name:
    default: ansible_cache_keys
    description: User defined name for cache keyset name.
    env:
    - name: ANSIBLE_CACHE_REDIS_KEYSET_NAME
    ini:
    - key: fact_caching_redis_keyset_name
      section: defaults
    version_added: 1.3.0
    version_added_collection: community.general

_sentinel_service_name:
    description: The redis sentinel service name (or referenced as cluster name).
    env:
    - name: ANSIBLE_CACHE_REDIS_SENTINEL
    ini:
    - key: fact_caching_redis_sentinel
      section: defaults
    version_added: 1.3.0
    version_added_collection: community.general