From 8ead840327dad570ba57aed79d802a519b255e6b Mon Sep 17 00:00:00 2001 From: Matt Wise Date: Mon, 9 Feb 2015 09:27:52 -0800 Subject: [PATCH] Fix wildcard File[] resource modifications. Replace the File<| |> resource modification in statsd::config with a much more selective subscription of the statsd::config class from the Service['statsd'] resource. --- manifests/config.pp | 18 ++++++++++-------- manifests/init.pp | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 385ec0d..47fb241 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -9,40 +9,42 @@ file { '/etc/statsd': ensure => directory, mode => '0755', + owner => 'root', + group => 'root', }-> file { $configfile: content => template('statsd/localConfig.js.erb'), mode => '0644', + owner => 'root', + group => 'root', } file { $statsd::init_location: source => $statsd::init_script, mode => $statsd::init_mode, + owner => 'root', + group => 'root', } file { '/etc/default/statsd': content => template('statsd/statsd-defaults.erb'), + owner => 'root', + group => 'root', mode => '0755', } file { '/var/log/statsd': ensure => directory, - owner => 'nobody', mode => '0755', + owner => 'nobody', + group => 'root', } file { '/usr/local/sbin/statsd': source => 'puppet:///modules/statsd/statsd-wrapper', mode => '0755', - } - - File { owner => 'root', group => 'root', } - if $statsd::manage_service == true { - File <| |> ~> Service['statsd'] - } - } diff --git a/manifests/init.pp b/manifests/init.pp index e360a4e..49a2a92 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -95,6 +95,7 @@ enable => $service_enable, hasstatus => true, provider => $init_provider, + subscribe => Class['statsd::config'], require => [ Package['statsd'], File['/var/log/statsd'] ], } }