Skip to content

idealista/redis_role

Repository files navigation

Logo

Redis Ansible role

Build Status Ansible Galaxy

This Ansible role installs Redis server in a Debian environment.

Getting Started

These instructions will get you a copy of the role for your Ansible playbook. Once launched, it will install a Redis server.

Prerequisities

Ansible 2.9.x.x version installed. Inventory destination should be a Debian environment.

For testing purposes, Molecule with Docker as driver.

Installing

Create or add to your roles dependency file (e.g requirements.yml):

- src: idealista.redis_role
  version: 4.0.3
  name: redis

Install the role with ansible-galaxy command:

ansible-galaxy install -p roles -r requirements.yml -f

Use in a playbook:

- hosts: someserver
  roles:
    - redis

Usage

ATTENTION since version 5.0.0 we have introduced authentication and it is important to use two variables:

  • redis_auth which is mandatory to have a value (true/false)
  • redis_password which defines the password that will be set, remember to put it in the vault so that it is not left unencrypted (it must be 30 characters, with numbers, upper and lower case)

IF THESE VARIABLES ARE NOT CORRECTLY CONFIGURED, THE ROLE INSTALLATION WILL FAIL WITH AN EXPLANATORY MESSAGE.

Look to the defaults properties file to see the possible configuration properties.

Note: It's recommended to use Prometheus Redis Exporter Role if Prometheus monitoring is needed.

Testing

Install dependencies

$ pipenv sync

For more information read the pipenv docs.

Testing single mode

$ pipenv run molecule test -s single

Testing cluster mode

$ pipenv run molecule test -s cluster

Built With

Ansible Molecule Goss

Versioning

For the versions available, see the tags on this repository.

Additionaly you can see what change in each version in the CHANGELOG.md file.

Authors

See also the list of contributors who participated in this project.

License

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.