Deprecated

Removed in 2.9

i

Reason:This lookup uses options intermingled with terms which blurs the interface between settings and data | Alternative:new 'redis' lookup

ansible.builtin._redis_kv (v2.6.20) — lookup

fetch data from Redis

| "added in version" 0.9 of ansible.builtin"

Authors: Jan-Piet Mens <jpmens(at)gmail.com>

Install Ansible via pip

Install with pip install ansible==2.6.20

Description

this lookup returns a list of items given to it, if any of the top level items is also a list it will flatten it, but it will not recurse


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: query redis for somekey
  debug: msg="{{ lookup('redis_kv', 'redis://localhost:6379,somekey') }} is value in Redis for somekey"

Inputs

    
_terms:
    description: Two element comma separated strings composed of url of the Redis server
      and key to query
    suboptions:
      _key:
        description: key to query
        required: true
      _url:
        default: redis://localhost:6379
        description: location of redis host in url format

Outputs

_raw:
  description: values stored in Redis