~sirn/ansible-freebsd-s6-redis

Ansible role for installing and configuring Redis on S6-enabled FreeBSD host

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~sirn/ansible-freebsd-s6-redis
read/write
git@git.sr.ht:~sirn/ansible-freebsd-s6-redis

You can also use your local clone with git send-email.

#ansible-freebsd-s6-redis

builds.sr.ht status

Configure Redis for FreeBSD host using S6.

Requires ansible-freebsd-s6 to be applied first.

#Variables

#redis_addresses
redis_addresses:
    - 127.0.0.1

Listen addresses for Redis. If omitted, redis_unix_socket must be set.

#redis_databases
redis_databases: 16

Number of databases available.

#redis_logger
redis_logger: |
    #!/usr/local/bin/execlineb -P
    s6-log -b n10 s1000000 t !"gzip -nq9" /var/log/redis/

Configure a Redis logger. See also s6-log.

#redis_max_memory
redis_max_memory:

Configure maximum memory Redis may use, e.g. 64m.

#redis_max_memory_policy
redis_max_memory_policy:

Configure expiration algorithm when Redis exceed its memory limit. This should be set to allkeys-lru when Redis is used as a cache.

#redis_port
redis_port: 6379

Port to listen to.

#redis_snapshotting
redis_snapshotting:
    - { after: 900, changes: 1 }
    - { after: 300, changes: 10 }
    - { after: 60, changes: 10000 }

Configure data snapshotting which will save the data from memory to disk once criteria are matched, e.g. { after: 900, changes: 1 } will save snapshot after 900 seconds if there was at least one change.

  • after number of seconds after the last snapshot
  • changes number of changes
#redis_snapshot_filename
redis_snapshot_filename: dump.rdb

Filename for the snapshot.

#redis_snapshot_dir
redis_snapshot_dir: /var/db/redis

Directory to save snapshot to.

#redis_unix_socket
redis_unix_socket:

Configure Redis UNIX socket path. If omitted, redis_addresses must be set.

#redis_unix_socket_perm
redis_unix_socket_perm: 777

Configure UNIX permission for Redis UNIX socket.