From c71c4f7207ce0dfe2e4a78e47dcd4a948c0d36fc Mon Sep 17 00:00:00 2001 From: Full Of Lilies Date: Tue, 28 Apr 2015 16:59:36 -0400 Subject: [PATCH] Parameterizing config file template name and source cookbook --- attributes/default.rb | 3 +++ recipes/default.rb | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 9c48c35..272bf93 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -35,3 +35,6 @@ default["monit"]["eventqueue"]["set"] = true default["monit"]["eventqueue"]["basedir"] = "/var/monit" default["monit"]["eventqueue"]["slots"] = 1000 + +default["monit"]["config_template_cookbook"] = "monit" +default["monit"]["config_template"] = "monitrc.erb" \ No newline at end of file diff --git a/recipes/default.rb b/recipes/default.rb index 08f78d9..2725178 100755 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -21,7 +21,8 @@ owner "root" group "root" mode 0700 - source 'monitrc.erb' + cookbook node['monit']['config_template_cookbook'] + source node['monit']['config_template'] notifies :restart, "service[monit]", :delayed end