PARALLAX

redis_data

Set or remove a Redis key with optional expiration and existence conditions

Collection: community.general

Full Name: community.general.redis_data

Synopsis

Set or remove a Redis key with optional expiration and existence conditions

Parameters

NameTypeRequiredDefaultDescription
login_hoststringlocalhostRedis server hostname
login_portint6379Redis server TCP port
login_userstringRedis ACL username
login_passwordstringRedis authentication password; never included in errors
tlsbooltrueConnect using TLS
validate_certsbooltrueValidate the TLS server certificate
ca_certsstringPEM file containing trusted certificate authorities
client_cert_filestringPEM client certificate file
client_key_filestringPEM client private key file
keystringyesDatabase key
valuestringValue required when state is present
statestringpresentWhether the key is present or absent
expirationintExpiration in milliseconds; mutually exclusive with keep_ttl
non_existingboolOnly set a missing key; mutually exclusive with existing
existingboolOnly set an existing key
keep_ttlboolRetain the existing expiration

Example

yaml
- name: Retrieve Redis information
  community.general.redis_data:
    login_host: localhost
    tls: false
    key: example
    value: example-value
Search
    ↑ ↓ move↵ openesc close