ansible_role_docker_redis

Ansible Role Docker Redis

This ansible role is used to setup Redis server with docker on linux.

Ansible Licence Distribution Distribution Distribution Distribution Actions


We eat, drink, sleep and most importantly love DevOps. DevOps always promotes automation and standardisation. While setting up various environments like local, dev, testing, production, etc. it is critical to maintain the same environment across. This can easily be achieved using automating the environment setup & installation with the help of ansible-playbooks.

Smaller roles are created for each environment elements; which also include tasks & tests. These roles can then be grouped together in ansible-playbook to achieve the desired yet consistent results.

Prerequisites

This module has a few dependencies:

What Includes

Following things includes in this role:

  • redis-cli
  • redis-server

Example Playbook

IMPORTANT: Since the master branch used in source varies based on new modifications, we suggest that you use the release versions here.

- hosts: localhost
  remote_user: root
  become: true
  roles:
    - clouddrove.ansible_role_docker_redis

Variables

  redis_version: "6.2"
  redis_user: redis
  redis_group: redis
  mount_path: /data
  redis_server_opt_dir: "/opt/redis-server"
  redis_server_config_dir: "{{ redis_server_opt_dir }}/config"
  redis_server_log_dir: "/var/log/redis"
  redis_server_data_dir: "{{ mount_path }}/redis-server"
  redis_server_bind: 0.0.0.0
  redis_server_port: 6379
  redis_server_password: false
  redis_server_min_slaves_to_write: 0
  redis_server_min_slaves_max_lag: 10
  redis_server_tcp_backlog: 10000
  redis_server_tcp_keepalive: 20
  redis_server_maxclients: 30000
  redis_server_timeout: 0
  redis_server_slaveof: false
  redis_server_slave_read_only: "yes"
  redis_server_slave_priority: 100
  redis_server_repl_backlog_size: false
  redis_server_dir: /var/lib/redis
  redis_server_logfile: '"/var/log/redis/redis-server.log"'
  redis_server_databases: 16
  redis_server_loglevel: notice
  redis_server_slowlog_log_slower_than: 10000
  redis_server_slowlog_max_len: 128
  redis_server_maxmemory: false
  redis_server_maxmemory_policy: noeviction
  redis_server_rename_commands: []
  redis_server_save:
    - 900 1
    - 300 10
    - 60 10000
  redis_server_stop_writes_on_bgsave_error: "yes"
  redis_server_rdbcompression: "yes"
  redis_server_rdbchecksum: "yes"
  redis_server_appendonly: "no"
  redis_server_appendfilename: "appendonly.aof"
  redis_server_appendfsync: "everysec"
  redis_server_no_appendfsync_on_rewrite: "no"
  redis_server_auto_aof_rewrite_percentage: "100"
  redis_server_auto_aof_rewrite_min_size: "64mb"
  redis_server_notify_keyspace_events: '""'

Installation

  $ ansible-galaxy install clouddrove.ansible_role_docker_redis

Feedback

If you come accross a bug or have any feedback, please log it in our issue tracker, or feel free to drop us an email at [email protected].

If you have found it worth your time, go ahead and give us a ★ on our GitHub!

About us

At CloudDrove, we offer expert guidance, implementation support and services to help organisations accelerate their journey to the cloud. Our services include docker and container orchestration, cloud migration and adoption, infrastructure automation, application modernisation and remediation, and performance engineering.

We are The Cloud Experts!


We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.

About

This ansible role is used to setup Redis server with docker on linux.

Install
ansible-galaxy install clouddrove/ansible-role-docker-redis
GitHub repository
License
mit
Downloads
120
Owner
Design, deployment, and management partner for your cloud