diff --git a/lib/puppet/provider/package/fluentd-gem.rb b/lib/puppet/provider/package/fluentd-gem.rb index b1476e2..0e981ac 100644 --- a/lib/puppet/provider/package/fluentd-gem.rb +++ b/lib/puppet/provider/package/fluentd-gem.rb @@ -8,6 +8,7 @@ Puppet::Type.type(:package).provide :fluentd_gem, :parent => :gem do not a valid URL, it will be interpreted as the path to a local gem file. If source is not present at all, the gem will be installed from the default gem repositories." + confine :exists => "/opt/td-agent/embedded/bin/gem" has_feature :versionable, :install_options diff --git a/manifests/config/file.pp b/manifests/config/file.pp index 3de5abb..97328b4 100644 --- a/manifests/config/file.pp +++ b/manifests/config/file.pp @@ -17,8 +17,10 @@ define fluentd::config::file ( # clean up to ensure priority changes take effect exec { "apply priority change for ${base_name}": - command => "rm ${::fluentd::conf_dir}/*-${base_name}", - onlyif => "ls ${::fluentd::conf_dir}/*-${base_name} | grep -v ${config_name}", + path => '/bin:/usr/bin:/usr/local/bin', + cwd => "${::fluentd::conf_dir}", + command => "rm *-${base_name}", + onlyif => "ls *-${base_name} | grep -v ${config_name}", before => File[$config_path], notify => Class['Fluentd::Service'], } diff --git a/manifests/repo/apt.pp b/manifests/repo/apt.pp index 1224d4e..dd0b136 100644 --- a/manifests/repo/apt.pp +++ b/manifests/repo/apt.pp @@ -10,6 +10,10 @@ class fluentd::repo::apt ( 'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F', 'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent' }, + $include = { + 'src' => false, + 'deb' => true, + }, ) { include '::apt' @@ -21,5 +25,6 @@ class fluentd::repo::apt ( architecture => $architecture, repos => $repos, key => $key, + include => $include, } }