From 307010a1037c07d7baa3d8a4e7de333a1ae2bd44 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Tue, 16 Jul 2013 22:09:22 +0300 Subject: [PATCH] redis: Added parameter for bind address --- redis/manifests/init.pp | 5 ++++- redis/templates/local.conf.erb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/redis/manifests/init.pp b/redis/manifests/init.pp index f8b9be7..666a643 100644 --- a/redis/manifests/init.pp +++ b/redis/manifests/init.pp @@ -2,6 +2,9 @@ # # === Parameters # +# $bind: +# Address to bind to. Defaults to "127.0.0.1". +# # $datadir: # Directory for redis database dumps. # Defaults to "/srv/redis". @@ -12,7 +15,7 @@ # $appendonly: # Enable append only mode. Defaults to false. # -class redis($datadir="", $password="", $appendonly=false) { +class redis($bind="127.0.0.1", $datadir="", $password="", $appendonly=false) { package { "redis": ensure => installed, diff --git a/redis/templates/local.conf.erb b/redis/templates/local.conf.erb index 4f8e637..2b569cf 100644 --- a/redis/templates/local.conf.erb +++ b/redis/templates/local.conf.erb @@ -1,4 +1,4 @@ -bind 127.0.0.1 +bind <%= @bind %> dir /srv/redis appendonly <% if @appendonly == true %>yes<% else %>no<% end %> <% if @password -%>