mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add password support to Redis returner
This commit is contained in:
parent
675370f86e
commit
13996cea60
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,7 @@ config, these are the defaults:
|
|||
redis.db: '0'
|
||||
redis.host: 'salt'
|
||||
redis.port: 6379
|
||||
redis.password: ''
|
||||
|
||||
.. versionadded:: 2018.3.1
|
||||
|
||||
|
@ -42,6 +43,7 @@ the default location:
|
|||
alternative.redis.db: '0'
|
||||
alternative.redis.host: 'salt'
|
||||
alternative.redis.port: 6379
|
||||
alternative.redis.password: ''
|
||||
|
||||
To use the redis returner, append '--return redis' to the salt command.
|
||||
|
||||
|
@ -152,6 +154,7 @@ def _get_options(ret=None):
|
|||
"port": "port",
|
||||
"unix_socket_path": "unix_socket_path",
|
||||
"db": "db",
|
||||
"password": "password",
|
||||
"cluster_mode": "cluster_mode",
|
||||
"startup_nodes": "cluster.startup_nodes",
|
||||
"skip_full_coverage_check": "cluster.skip_full_coverage_check",
|
||||
|
@ -163,6 +166,7 @@ def _get_options(ret=None):
|
|||
"port": __opts__.get("redis.port", 6379),
|
||||
"unix_socket_path": __opts__.get("redis.unix_socket_path", None),
|
||||
"db": __opts__.get("redis.db", "0"),
|
||||
"password": __opts__.get("redis.password", ""),
|
||||
"cluster_mode": __opts__.get("redis.cluster_mode", False),
|
||||
"startup_nodes": __opts__.get("redis.cluster.startup_nodes", {}),
|
||||
"skip_full_coverage_check": __opts__.get(
|
||||
|
@ -196,6 +200,7 @@ def _get_serv(ret=None):
|
|||
port=_options.get("port"),
|
||||
unix_socket_path=_options.get("unix_socket_path", None),
|
||||
db=_options.get("db"),
|
||||
password=_options.get("password"),
|
||||
decode_responses=True,
|
||||
)
|
||||
return REDIS_POOL
|
||||
|
|
Loading…
Add table
Reference in a new issue