Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

ansible role for configuring redit - MultiCloud PaaS team

Notifications You must be signed in to change notification settings

alphagov/paas-alpha-ansible-playbook-redis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis

This role helps to deploy a Redis master or replication server on target host. This roles sets several default values for Redis configuration which can be overrriden by the user.

Requirements

This role requires Ansible 1.4 or higher, and platform requirements are listed in the metadata file.

Role Variables

The variables that can be passed to this role and a brief description about them are as follows. See the documentation for Redis for details:

redis_server_version: 2.6.0       # The version of redis to install defaults to `latest`
redis_bind_address                # The network address for redis to bind to
redis_port: 6379                  # Port for redis server
redis_syslog_enabled: "yes"       # enable_syslog
redis_databases: 16               # Set number of databases
redis_database_save_times:        # Save the DB on disk (seconds changes)
  - [900, 1]
  - [300, 10]
  - [60, 10000]
redis_dbfilename: dump.rdb        # Filename for the db
redis_db_dir: /var/lib/redis      # DB directory
redis_role: master                # The role for this redis deployment (master/slave)
redis_requirepass: false          # If password is required for querying
redis_pass: None                  # Password if require_pass is enabled
redis_max_clients: 128
redis_max_memory: 512mb
redis_maxmemory_policy: volatile-lru
redis_appendfsync: everysec       # How often to sync the filesystem

# If redis_role is "slave", set these values too
redis_master_ip: 1.1.1.1          # The master's IP
redis_master_port: 6379           # master port
redis_master_auth: None           # master auth

Examples

The following example sets up a master Redis server.

- hosts: all
  sudo: true
  roles:
  - {role: bennojoy.redis, redis_port: 11244}

The following example sets up a slave Redis server.

- hosts: all
  sudo: true
  roles:
  - {role: bennojoy.redis,
     redis_role: 'slave',
     master_ip: '192.168.2.10',
     master_auth: 'foobar'}

Dependencies

None

License

BSD

Author Information

Benno Joy

About

ansible role for configuring redit - MultiCloud PaaS team

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published