redis_kv – fetch data from Redis


Removed in Ansible:
Why:This lookup uses options intermingled with terms which blurs the interface between settings and data
Alternative:new ‘redis’ lookup


  • 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


The below requirements are needed on the local master node that executes this lookup.


Parameter Choices/Defaults Configuration Comments
Two element comma separated strings composed of url of the Redis server and key to query


- name: query redis for somekey
  debug: msg="{{ lookup('redis_kv', 'redis://localhost:6379,somekey') }} is value in Redis for somekey"

Return Values

Common return values are documented here, the following are the fields unique to this lookup:

Key Returned Description
values stored in Redis


  • This lookup will be removed in version . [deprecated]
  • For more information see DEPRECATED.


  • Jan-Piet Mens <jpmens(at)>


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


Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.