Skip to content

Commit

Permalink
redis_sentinel.conf.j2: Support sentinel rename-command option (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithnoguchi authored Jul 3, 2020
1 parent 0c327bb commit 2cd295d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ redis_sentinel_monitors:
failover_timeout: 180000
notification_script: false
client_reconfig_script: false
rename_commands: []
```

## Facts
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,4 @@ redis_sentinel_monitors:
failover_timeout: 180000
notification_script: false
client_reconfig_script: false
rename_commands: []
6 changes: 5 additions & 1 deletion templates/redis_sentinel.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ sentinel monitor {{ master.name }} {{ master.host }} {{ master.port }} {{ master
sentinel {{ option|replace('_', '-') }} {{ master.name }} {{ master[option] }}
{% endif %}
{% endfor -%}

{% if master['rename_commands'] is defined -%}
{% for command in master['rename_commands'] -%}
sentinel rename-command {{ master.name }} {{ command }}
{% endfor -%}
{% endif -%}
{% endfor -%}

logfile {{ redis_sentinel_logfile }}
Expand Down

0 comments on commit 2cd295d

Please sign in to comment.