Install and configure redis cluster on your system.
[redis_cluster:children]
redis_cluster_infra
[redis_cluster_infra]
vm-dev-redis-infra-0 redis_role="master"
vm-dev-redis-infra-1 redis_role="master"
vm-dev-redis-infra-2 redis_role="master"
vm-dev-redis-infra-3 redis_role="slave"
vm-dev-redis-infra-4 redis_role="slave"
vm-dev-redis-infra-5 redis_role="slave"
---
- name: Deploy Redis Cluster
hosts: redis_cluster
pre_tasks:
- name: Verify Ansible meets Redis cluster requirements.
assert:
that: "ansible_version.full is version_compare('2.10.0', '>=')"
msg: >
"You must update Ansible to at least 2.10.0 to use this playbook"
roles:
- { role: ansible-role-redis-cluster, tags: redis-cluster }
These variables are set in defaults/main.yml.
---
######### redis config
redis_cluster_replica: 1
redis_cluster_conf:
cluster_enabled: "yes"
master_port: "6379"
slave_port: "6379"
maxmemory: "64mb"
rename_commands:
- FLUSHDB
- FLUSHALL
- KEYS
- SHUTDOWN
....
pip packages listed in requirements.txt.
MIT
v0112358