puppet-prod/modules/redisha/templates/redisadm.erb
Ben Vincent b7fc6a1993 feat: create redisha module
- manage redis/sentinel clusters
- ensure ulimit_managed is false
- dynamically find servers in role to identify master
- add redisadm and sentineladm commands
- add script to check if the current host in the master
2024-08-10 17:39:24 +10:00

10 lines
276 B
Plaintext

#!/usr/bin/bash
REDIS_HOST=<%= @redis_host %>
REDIS_PORT=<%= @redis_port %>
if [ $# -gt 0 ]; then
REDISCLI_AUTH=<%= @requirepass %> redis-cli -h "$REDIS_HOST" -p "$REDIS_PORT" "$@"
else
REDISCLI_AUTH=<%= @requirepass %> redis-cli -h "$REDIS_HOST" -p "$REDIS_PORT"
fi