Skip to content

Commit

Permalink
Merge pull request redhat-openstack#189 from cloudevelops/consolidate…
Browse files Browse the repository at this point in the history
…-curl-json-plugin

New style naming and permissions for curl_json plugin
  • Loading branch information
blkperl committed Oct 27, 2014
2 parents 462b312 + 7cf838f commit a5aa0ae
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions manifests/plugin/curl_json.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@
$keys,
$user = undef,
$password = undef,
$order = '10',
) {

include collectd::params
validate_hash($keys)

$conf_dir = $collectd::params::plugin_conf_dir

# This is deprecated file naming ensuring old style file removed, and should be removed in next major relese
file { "${name}.load-deprecated":
path => "${conf_dir}/${name}.conf",
ensure => absent,
}
# End deprecation

file {
"${name}.load":
path => "${conf_dir}/${name}.conf",
path => "${conf_dir}/${order}-${name}.conf",
owner => 'root',
group => $collectd::params::root_group,
mode => '0644',
mode => '0640',
content => template('collectd/curl_json.conf.erb'),
notify => Service['collectd'],
}
Expand Down

0 comments on commit a5aa0ae

Please sign in to comment.