From eae261d034e0abc407ff61b77fae161004577a86 Mon Sep 17 00:00:00 2001 From: OKUMURA Takahiro Date: Thu, 24 Sep 2015 14:16:09 +0900 Subject: [PATCH] Allow including config files by default --- manifests/install.pp | 4 ++++ spec/classes/install_spec.rb | 1 + templates/mackerel-agent.conf.erb | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index ddc0e6a..2ac9ab6 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -36,4 +36,8 @@ package { 'mackerel-agent': ensure => $ensure } + + file { '/etc/mackerel-agent/conf.d': + ensure => directory, + } } diff --git a/spec/classes/install_spec.rb b/spec/classes/install_spec.rb index ab0ef0f..3d06324 100644 --- a/spec/classes/install_spec.rb +++ b/spec/classes/install_spec.rb @@ -3,6 +3,7 @@ describe 'mackerel_agent::install' do context 'with present (default)' do it { should contain_package('mackerel-agent').with_ensure('present') } + it { should contain_file('/etc/mackerel-agent/conf.d').with_ensure('directory') } end context 'with absent' do diff --git a/templates/mackerel-agent.conf.erb b/templates/mackerel-agent.conf.erb index 5953dc1..6f4cd78 100644 --- a/templates/mackerel-agent.conf.erb +++ b/templates/mackerel-agent.conf.erb @@ -7,7 +7,7 @@ root = "." verbose = false # Include other config files -# include = "/etc/mackerel-agent/conf.d/*.conf" +include = "/etc/mackerel-agent/conf.d/*.conf" # Configuration for connection # [connection]