Note
This plugin is part of the community.general collection (version 3.8.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
.
To use it in a playbook, specify: community.general.redis_data_info
.
New in version 3.7.0: of community.general
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
ca_certs string | Path to root certificates file. If not set and tls is set to true , certifi ca-certificates will be used. | |
key string / required | Database key. | |
login_host string | Default: "localhost" | Specify the target host running the database. |
login_password string | Specify the password to authenticate with. Usually not used when target is localhost. | |
login_port integer | Default: 6379 | Specify the port to connect to. |
login_user string | Specify the user to authenticate with. Requires redis >= 3.4.0. | |
tls boolean |
| Specify whether or not to use TLS for the connection. |
validate_certs boolean |
| Specify whether or not to validate TLS certificates. This should only be turned off for personally controlled sites or with localhost as target. |
Note
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
The official documentation on the community.general.redis_info module.
The official documentation on the community.general.redis module.
- name: Get key foo=bar from loalhost with no username community.general.redis_data_info: login_host: localhost login_password: supersecret key: foo - name: Get key foo=bar on redishost with custom ca-cert file community.general.redis_data_info: login_host: redishost login_password: supersecret login_user: somuser validate_certs: true ssl_ca_certs: /path/to/ca/certs key: foo
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
exists boolean | on success | If they key exists in the database. |
msg string | always | A short message. Sample: Got key: foo with value: bar |
value string | if existing | Value key was set to. Sample: value_of_some_key |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/redis_data_info_module.html