hifis.redis

<!--
SPDX-FileCopyrightText: 2022 Helmholtz Centre for Environmental Research (UFZ)
SPDX-FileCopyrightText: 2022 Helmholtz-Zentrum Dresden-Rossendorf (HZDR)

SPDX-License-Identifier: Apache-2.0
-->

# Redis Ansible Role

:warning: **This project is no longer active!** :warning:

This role has been moved to our `hifis.toolkit` collection:

- <https://github.com/hifis-net/ansible-collection-toolkit>
- <https://galaxy.ansible.com/ui/repo/published/hifis/toolkit/>

[![CI Status](https://github.com/hifis-net/ansible-role-redis/actions/workflows/ci.yml/badge.svg)](https://github.com/hifis-net/ansible-role-redis/actions/workflows/ci.yml)
[![Ansible Role: hifis.redis](https://img.shields.io/badge/role-hifis.redis-blue)](https://galaxy.ansible.com/ui/standalone/roles/hifis/redis/)
[![Ansible Role Downloads](https://img.shields.io/ansible/role/d/hifis/redis)](https://galaxy.ansible.com/ui/standalone/roles/hifis/redis/)
[![Apache-2.0 Licensed](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/hifis-net/ansible-role-redis/blob/main/LICENSES/Apache-2.0.txt)
[![Latest release](https://img.shields.io/github/v/release/hifis-net/ansible-role-redis)](https://github.com/hifis-net/ansible-role-redis/releases)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8366541.svg)](https://doi.org/10.5281/zenodo.8366541)

This role helps set up Redis instances that can serve as caching servers with high availability and scalability.

The currently supported platforms are:

- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS

## Requirements

No requirements.

## Role Variables

Specify the Redis version to install:
```yaml
redis_version: '7.2.1'

Indicate if this node is a master or a replica:

redis_instance_type: 'master'

The IP address for Redis to listen on:

redis_instance_ip: "127.0.0.1"

The IP address of the Redis master:

redis_master_instance_ip: "{{ redis_instance_ip if redis_instance_type == 'master' else None }}"

The name of the Redis cluster to be monitored by Sentinel:

redis_cluster_name: 'redis-cluster'

Password for Redis cluster authentication:

redis_password: 'changeme'

List of packages needed for Redis to work:

redis_dependencies:
  - 'build-essential'

URL to download the Redis Server:

redis_download_url: "https://download.redis.io/releases/redis-{{ redis_version }}.tar.gz"

Path for the Redis Server binary:

redis_bin: '/usr/local/bin/redis-server'

Path for the directory where Redis Server is built:

redis_build_dir: '/usr/local/src/redis-{{ redis_version }}'

Directory where Redis service files are stored:

redis_systemd_dir: '/etc/systemd/system'

Path for the Redis Server service file:

redis_server_service_file: '{{ redis_systemd_dir }}/redis-server.service'

Path for the Redis Sentinel service file:

redis_sentinel_service_file: '{{ redis_systemd_dir }}/redis-sentinel.service'

Password for Redis Sentinel. It’s not set by default.

redis_sentinel_password: 'changeme'

Path to the Redis configuration directory:

redis_configuration_dir: '/etc/redis'

Path for Redis Server configuration file:

redis_server_configuration_file: '{{ redis_configuration_dir }}/redis.conf'

Path for Redis Sentinel configuration file:

redis_sentinel_configuration_file: '{{ redis_configuration_dir }}/sentinel.conf'

Redis library directory:

redis_lib_dir: '/var/lib/redis'

Redis log directory:

redis_log_dir: '/var/log/redis'

Path for the Redis Server log file:

redis_server_log_file_path: "{{ redis_log_dir }}/redis-server.log"

Path for the Redis Sentinel log file:

redis_sentinel_log_file_path: "{{ redis_log_dir }}/redis-sentinel.log"

Log level for Redis, options include: debug, verbose, notice, warning:

redis_log_level: 'notice'

Log level for Sentinel, options include: debug, verbose, notice, warning:

sentinel_log_level: 'notice'

Enable or disable protected mode for Redis Server:

redis_protected_mode: 'yes'

Enable or disable protected mode for Redis Sentinel:

sentinel_protected_mode: 'yes'

Username for Redis:

redis_user: 'redis'

Group name for Redis:

redis_group: 'redis'

Service name for Redis Server:

redis_server_service_name: 'redis-server'

Service name for Redis Sentinel:

redis_sentinel_service_name: 'redis-sentinel'

Dependencies

No dependencies.

Example Playbook

- hosts: servers
  roles:
    - role: hifis.redis

License

Apache-2.0

Author Information

HIFIS Software Team ```

Informazioni sul progetto

Install and configure Redis

Installa
ansible-galaxy install hifis.redis
Licenza
other
Download
17.5k
Proprietario
Helmholtz Digital Services for Science — Collaboration made easy.