From 2ac38b2256ed60a998876614cb1c71250507abf4 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Thu, 13 Aug 2015 16:42:27 -0700 Subject: [PATCH] Fix template variables Using ruby methods to access manifest variables is deprecated in puppet 3 and will be removed in puppet 4. This patch fixes the templates to use ruby instance variables instead. Change-Id: I27ef543b21f5da4f7f7df72674ef8ce4002ef8b7 --- templates/redis.2.2.conf.erb | 10 +++++----- templates/redis.2.4.conf.erb | 12 ++++++------ templates/redis.2.6.conf.erb | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/templates/redis.2.2.conf.erb b/templates/redis.2.2.conf.erb index 32e40a2..26145b1 100644 --- a/templates/redis.2.2.conf.erb +++ b/templates/redis.2.2.conf.erb @@ -22,12 +22,12 @@ pidfile /var/run/redis/redis-server.pid # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. -port <%= redis_port %> +port <%= @redis_port %> # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. # -bind <%= redis_bind %> +bind <%= @redis_bind %> # Specify the path for the unix socket that will be used to listen for # incoming connections. There is no default, so Redis will not listen @@ -147,8 +147,8 @@ slave-serve-stale-data yes # 150k passwords per second against a good box. This means that you should # use a very strong password otherwise it will be very easy to break. # -<% if redis_password != "" %> -requirepass <%= redis_password %> +<% if @redis_password != "" %> +requirepass <%= @redis_password %> <% end %> # Command renaming. @@ -194,7 +194,7 @@ requirepass <%= redis_password %> # to upgrade. With maxmemory after the limit is reached you'll start to get # errors for write operations, and this may even lead to DB inconsistency. # -maxmemory <%= redis_max_memory %> +maxmemory <%= @redis_max_memory %> # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory # is reached? You can select among five behavior: diff --git a/templates/redis.2.4.conf.erb b/templates/redis.2.4.conf.erb index ec87645..ea74656 100644 --- a/templates/redis.2.4.conf.erb +++ b/templates/redis.2.4.conf.erb @@ -18,16 +18,16 @@ daemonize yes # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. You can specify a custom pid file location here. -pidfile /var/run/redis_<%= redis_port %>.pid +pidfile /var/run/redis_<%= @redis_port %>.pid # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. -port <%= redis_port %> +port <%= @redis_port %> # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. # -bind <%= redis_bind %> +bind <%= @redis_bind %> # Specify the path for the unix socket that will be used to listen for # incoming connections. There is no default, so Redis will not listen @@ -178,8 +178,8 @@ slave-priority 100 # 150k passwords per second against a good box. This means that you should # use a very strong password otherwise it will be very easy to break. # -<% if redis_password != "" %> -requirepass <%= redis_password %> +<% if @redis_password != "" %> +requirepass <%= @redis_password %> <% end %> # Command renaming. @@ -231,7 +231,7 @@ requirepass <%= redis_password %> # limit for maxmemory so that there is some free RAM on the system for slave # output buffers (but this is not needed if the policy is 'noeviction'). # -maxmemory <%= redis_max_memory %> +maxmemory <%= @redis_max_memory %> # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory # is reached? You can select among five behavior: diff --git a/templates/redis.2.6.conf.erb b/templates/redis.2.6.conf.erb index 3c00c3d..b1b6ae3 100644 --- a/templates/redis.2.6.conf.erb +++ b/templates/redis.2.6.conf.erb @@ -18,16 +18,16 @@ daemonize yes # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. You can specify a custom pid file location here. -pidfile /var/run/redis_<%= redis_port %>.pid +pidfile /var/run/redis_<%= @redis_port %>.pid # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. -port <%= redis_port %> +port <%= @redis_port %> # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. # -bind <%= redis_bind %> +bind <%= @redis_bind %> # Specify the path for the unix socket that will be used to listen for # incoming connections. There is no default, so Redis will not listen @@ -255,8 +255,8 @@ slave-priority 100 # 150k passwords per second against a good box. This means that you should # use a very strong password otherwise it will be very easy to break. # -<% if redis_password != "" %> -requirepass <%= redis_password %> +<% if @redis_password != "" %> +requirepass <%= @redis_password %> <% end %> # Command renaming. @@ -314,7 +314,7 @@ requirepass <%= redis_password %> # limit for maxmemory so that there is some free RAM on the system for slave # output buffers (but this is not needed if the policy is 'noeviction'). # -maxmemory <%= redis_max_memory %> +maxmemory <%= @redis_max_memory %> # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory # is reached. You can select among five behaviors: