??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
àUdac @` sº d d l m Z m Z m Z e Z d Z d Z d Z d d l Z e
Z y d d l Z e
Z Wn e k
ro n Xd d l m Z d d l m Z d d l m Z d e f d
„ ƒ YZ d S( i ( t absolute_importt divisiont print_functions‹
lookup: redis
author:
- Jan-Piet Mens (@jpmens)
- Ansible Core
version_added: "2.5"
short_description: fetch data from Redis
description:
- This lookup returns a list of results from a Redis DB corresponding to a list of items given to it
requirements:
- redis (python library https://github.com/andymccurdy/redis-py/)
options:
_terms:
description: list of keys to query
host:
description: location of Redis host
default: '127.0.0.1'
env:
- name: ANSIBLE_REDIS_HOST
ini:
- section: lookup_redis
key: host
port:
description: port on which Redis is listening on
default: 6379
type: int
env:
- name: ANSIBLE_REDIS_PORT
ini:
- section: lookup_redis
key: port
socket:
description: path to socket on which to query Redis, this option overrides host and port options when set.
type: path
env:
- name: ANSIBLE_REDIS_SOCKET
ini:
- section: lookup_redis
key: socket
s
- name: query redis for somekey (default or configured settings used)
debug: msg="{{ lookup('redis', 'somekey') }}"
- name: query redis for list of keys and non-default host and port
debug: msg="{{ lookup('redis', item, host='myredis.internal.com', port=2121) }}"
loop: '{{list_of_redis_keys}}'
- name: use list directly
debug: msg="{{ lookup('redis', 'key1', 'key2', 'key3') }}"
- name: use list directly with a socket
debug: msg="{{ lookup('redis', 'key1', 'key2', socket='/var/tmp/redis.sock') }}"
s/
_raw:
description: value(s) stored in Redis
N( t to_text( t AnsibleError( t
LookupBaset LookupModulec B` s e Z d „ Z RS( c K` s t s t d ƒ ‚ n | j d | ƒ | j d ƒ } | j d ƒ } | j d ƒ } | d k ry t j d | d | ƒ } n t j d | ƒ } g } xw | D]o } y; | j | ƒ }
|
d k rÅ d }
n | j t |
ƒ ƒ Wq˜ t
k
r} t d j | | ƒ ƒ ‚ q˜ Xq˜ W| S( Ns5 Can't LOOKUP(redis_kv): module redis is not installedt directt hostt portt sockett unix_socket_patht s- Encountered exception while fetching {0}: {1}( t
HAVE_REDISR t set_optionst
get_optiont Nonet redist Redist gett appendR t Exceptiont format( t selft termst variablest kwargsR R R
t connt rett termt rest e( ( s@ /usr/lib/python2.7/site-packages/ansible/plugins/lookup/redis.pyt runU s&