Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stone-payments/ansible-redis
Ansible role to setup a Redis with clustering support
https://github.com/stone-payments/ansible-redis
ansible cluster evolucaoinfra paas redis
Last synced: 2 days ago
JSON representation
Ansible role to setup a Redis with clustering support
- Host: GitHub
- URL: https://github.com/stone-payments/ansible-redis
- Owner: stone-payments
- License: mit
- Created: 2017-04-24T19:25:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T13:49:21.000Z (11 months ago)
- Last Synced: 2024-04-16T00:09:01.302Z (7 months ago)
- Topics: ansible, cluster, evolucaoinfra, paas, redis
- Language: Jinja
- Size: 260 KB
- Stars: 4
- Watchers: 447
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
stone-payments.redis
============
Role for Ansible which manages Redis in a standalone setup or cluster# Quickstart
There's absolute no variable needed to setup a basic, passwordless,
loopback-only, standalone Redis setup. Just include it in a play:
```
- name: install redis
hosts: all
roles: stone-payments.redis
```# Cluster setup
In order to build a cluster, you need to inform the master that he is a
master, and a replica on which master to connect to. You can do all this with
the following excerpt:
```
- name: install redis cluster
host: all
roles: stone-payments.redis
vars:
redis_srv_conn_bind: "0.0.0.0"
redis_srv_repl_masterAddr: "1.2.3.4"
redis_srv_repl_isMaster: "{{ true if redis_srv_repl_masterAddr in ansible_all_ipv4_addresses else false }}"
redis_sent_enabled: true
redis_sent_monitors:
- name: "someMasterName"
host: "{{ redis_srv_repl_masterAddr }}"
port: 6379
quorum: 2
auth_pass: ""
down_after_milliseconds: 3000
```# Other configs
I believe almost every other config is self-explanatory or directly related to
a Redis core feature. Simply override the configs on `defaults/main.yml` and
they will be (hopefully) applied to your system.