??????????????
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 i d d 6d g d 6d d 6Z d Z d Z d d
l Z d
Z y d d
l Z Wn# e
k
r e j Z e Z n Xe Z d d l m Z m Z d d l m Z d
Z d Z d
d Z d Z e d k rύ e n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys4
---
module: redis
short_description: Various redis commands, slave and flush
description:
- Unified utility to interact with redis instances.
version_added: "1.3"
options:
command:
description:
- The selected redis command
- C(config) (new in 1.6), ensures a configuration setting on an instance.
- C(flush) flushes all the instance or a specified db.
- C(slave) sets a redis instance in slave or master mode.
required: true
choices: [ config, flush, slave ]
login_password:
description:
- The password used to authenticate with (usually not used)
login_host:
description:
- The host running the database
default: localhost
login_port:
description:
- The port to connect to
default: 6379
master_host:
description:
- The host of the master instance [slave command]
master_port:
description:
- The port of the master instance [slave command]
slave_mode:
description:
- the mode of the redis instance [slave command]
default: slave
choices: [ master, slave ]
db:
description:
- The database to flush (used in db mode) [flush command]
flush_mode:
description:
- Type of flush (all the dbs in a redis instance or a specific one)
[flush command]
default: all
choices: [ all, db ]
name:
description:
- A redis config key.
version_added: 1.6
value:
description:
- A redis config value.
version_added: 1.6
notes:
- Requires the redis-py Python package on the remote host. You can
install it with pip (pip install redis) or with a package manager.
https://github.com/andymccurdy/redis-py
- If the redis master instance we are making slave of is password protected
this needs to be in the redis.conf in the masterauth variable
requirements: [ redis ]
author: "Xabier Larrakoetxea (@slok)"
s¦
- name: Set local redis instance to be slave of melee.island on port 6377
redis:
command: slave
master_host: melee.island
master_port: 6377
- name: Deactivate slave mode
redis:
command: slave
slave_mode: master
- name: Flush all the redis db
redis:
command: flush
flush_mode: all
- name: Flush only one db in a redis instance
redis:
command: flush
db: 1
flush_mode: db
- name: Configure local redis to have 10000 max clients
redis:
command: config
name: maxclients
value: 10000
- name: Configure local redis to have lua time limit of 100 ms
redis:
command: config
name: lua-time-limit
value: 100
N( t
AnsibleModulet missing_required_lib( t to_nativec C` s- y | j | | SWn t k
r( t SXd S( N( t slaveoft Exceptiont False( t clientt master_hostt master_port( ( sG /usr/lib/python2.7/site-packages/ansible/modules/database/misc/redis.pyt set_slave_mode s
c C` s' y | j SWn t k
r" t SXd S( N( R R R
( R ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/database/misc/redis.pyt set_master_mode s
c C` s@ y' t | t s | j S| j SWn t k
r; t SXd S( N( t
isinstancet intt flushallt flushdbR R
( R t db( ( sG /usr/lib/python2.7/site-packages/ansible/modules/database/misc/redis.pyt flush s
c C` s t d t d t d d d d d d g d t d d d
t d t d d d d
d t d d d d d t d d d t d d d t d d d d d d d g d t d d d t d d d d d d d g d t d d d t d d d t } t s'| j d t d d t n | j d } | j d } | j d } | j d } | d k r£| j d } | j d } | j d } | d k rΟ| s³| j d d n | sΟ| j d d qΟn t j d | d! | d" | } y | j
Wn9 t k
r6} | j d d# t | d t
j n X| j }
| d k rx|
d$ d k rx| j d% t d&