I need to rename but not remove destructive commands differently based on environment. For some reason I can't seem to get rename_commands to work via JSON environment files.
:pancakes: Cookbook version
4.1.1
:woman_cook: Chef-Infra Version
15.13.8
:tophat: Platform details
Centos 7
Steps To Reproduce
Add rename_commands with a value that is a hash of commands and their new values to a JSON environment file.
I should see something like this getting written into the config file:
# It is also possible to completely kill a command renaming it into
# an empty string:
#
# rename-command CONFIG ""
rename-command FLUSHALL "flushall_unsafe_34562"
rename-command FLUSHDB "flushdb_unsafe_87451"
################################### LIMITS ####################################
:heavy_plus_sign: Additional context
I can see the relevant code in redis.conf.erb (below), so I'm not clear why this isn't working for me, but nothing is written into that section
<% if !@rename_commands.nil? %>
<% @rename_commands.each do |k, v| %>
<% v = '""' if v.nil? || v.empty? %>
<%= "rename-command #{k} #{v}" %>
<% end %>
<% end %>
:ghost: Brief Description
I need to rename but not remove destructive commands differently based on environment. For some reason I can't seem to get
rename_commands
to work via JSON environment files.:pancakes: Cookbook version
4.1.1
:woman_cook: Chef-Infra Version
15.13.8
:tophat: Platform details
Centos 7
Steps To Reproduce
Add
rename_commands
with a value that is a hash of commands and their new values to a JSON environment file.:police_car: Expected behavior
I should see something like this getting written into the config file:
:heavy_plus_sign: Additional context
I can see the relevant code in redis.conf.erb (below), so I'm not clear why this isn't working for me, but nothing is written into that section