Skip to content

Commit

Permalink
Adding securized redis.conf capability
Browse files Browse the repository at this point in the history
  • Loading branch information
frinux committed Jun 2, 2017
1 parent 997dc7f commit 413895d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,24 @@ redis_appendfsync: "everysec"

# Add extra include files for local configuration/overrides.
redis_includes: []

# If set, activate Redis authentication with this password
# Prefer long passwords. They may be generated with: echo "mypassword" | sha256sum
redis_requirepass: ""

# Disable these commands. Recommanded if Redis server is publicly opened.
redis_disabled_command: []
# - FLUSHDB
# - FLUSHALL
# - KEYS
# - PEXPIRE
# - DEL
# - CONFIG
# - SHUTDOWN
# - BGREWRITEAOF
# - BGSAVE
# - SAVE
# - SPOP
# - SREM
# - RENAME
# - DEBUG
8 changes: 8 additions & 0 deletions templates/redis.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ no-appendfsync-on-rewrite no
{% for include in redis_includes %}
include {{ include }}
{% endfor %}

{% if redis_requirepass %}
requirepass {{ redis_requirepass }}
{% endif %}

{% for redis_disabled_command in redis_disabled_commands %}
rename-command {{ redis_disabled_command }} ""
{% endfor %}

0 comments on commit 413895d

Please sign in to comment.