mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
[PR #8624/37c85605 backport][stable-9] Type options of cache plugins (#8686)
Type options of cache plugins (#8624)
* Type options of cache plugins.
* Do not change type of _timeout for now.
(cherry picked from commit 37c8560542
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
4c734ea134
commit
9b0ebef408
5 changed files with 17 additions and 2 deletions
7
plugins/cache/redis.py
vendored
7
plugins/cache/redis.py
vendored
|
@ -21,6 +21,7 @@ DOCUMENTATION = '''
|
|||
- The format is V(host:port:db:password), for example V(localhost:6379:0:changeme).
|
||||
- To use encryption in transit, prefix the connection with V(tls://), as in V(tls://localhost:6379:0:changeme).
|
||||
- To use redis sentinel, use separator V(;), for example V(localhost:26379;localhost:26379;0:changeme). Requires redis>=2.9.0.
|
||||
type: string
|
||||
required: true
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
|
||||
|
@ -29,6 +30,7 @@ DOCUMENTATION = '''
|
|||
section: defaults
|
||||
_prefix:
|
||||
description: User defined prefix to use when creating the DB entries
|
||||
type: string
|
||||
default: ansible_facts
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
|
||||
|
@ -37,6 +39,7 @@ DOCUMENTATION = '''
|
|||
section: defaults
|
||||
_keyset_name:
|
||||
description: User defined name for cache keyset name.
|
||||
type: string
|
||||
default: ansible_cache_keys
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_REDIS_KEYSET_NAME
|
||||
|
@ -46,6 +49,7 @@ DOCUMENTATION = '''
|
|||
version_added: 1.3.0
|
||||
_sentinel_service_name:
|
||||
description: The redis sentinel service name (or referenced as cluster name).
|
||||
type: string
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_REDIS_SENTINEL
|
||||
ini:
|
||||
|
@ -54,13 +58,14 @@ DOCUMENTATION = '''
|
|||
version_added: 1.3.0
|
||||
_timeout:
|
||||
default: 86400
|
||||
type: integer
|
||||
# TODO: determine whether it is OK to change to: type: float
|
||||
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
|
||||
ini:
|
||||
- key: fact_caching_timeout
|
||||
section: defaults
|
||||
type: integer
|
||||
'''
|
||||
|
||||
import re
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue