community.general.redis_info module – Gather information about Redis servers
Note
This module is part of the community.general collection (version 9.5.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.redis_info
.
New in community.general 0.2.0
Synopsis
Gathers information and statistics about Redis servers.
Requirements
The below requirements are needed on the host that executes this module.
redis
certifi
Parameters
Parameter |
Comments |
---|---|
Path to root certificates file. If not set and |
|
Path to the client certificate file. |
|
Path to the client private key file. |
|
Specify the target host running the database. Default: |
|
Specify the password to authenticate with. Usually not used when target is localhost. |
|
Specify the port to connect to. Default: |
|
Specify the user to authenticate with. Requires redis >= 3.4.0. |
|
Specify whether or not to use TLS for the connection. Choices:
|
|
Specify whether or not to validate TLS certificates. This should only be turned off for personally controlled sites or with Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
Requires the
redis
Python package on the remote host. You can install it with pip (pip install redis
) or with a package manager. Information on the library can be found at https://github.com/andymccurdy/redis-py.
See Also
See also
- community.general.redis
Various redis commands, replica and flush.
Examples
- name: Get server information
community.general.redis_info:
register: result
- name: Print server information
ansible.builtin.debug:
var: result.info
- name: Get server cluster information
community.general.redis_info:
cluster: true
register: result
- name: Print server cluster information
ansible.builtin.debug:
var: result.cluster_info
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The default set of cluster information sections https://redis.io/commands/cluster-info. Returned: success if Sample: |
|
The default set of server information sections https://redis.io/commands/info. Returned: success Sample: |