Skip to content

Commit

Permalink
Merge pull request redhat-openstack#188 from cloudevelops/consolidate…
Browse files Browse the repository at this point in the history
…-python-plugin-2

Ensured deprecated file removed
  • Loading branch information
blkperl committed Oct 27, 2014
2 parents a5aa0ae + 27ad95b commit f08d58c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions manifests/plugin/python.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@
$module,
$script_source,
$config = {},
$order = '10',
) {
include collectd::params

validate_hash($config)

$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/python.conf.erb'),
notify => Service['collectd'],
}
Expand All @@ -26,7 +34,7 @@
path => "${modulepath}/${module}.py",
owner => 'root',
group => $collectd::params::root_group,
mode => '0644',
mode => '0640',
source => $script_source,
require => File["${name}.load"],
notify => Service['collectd'],
Expand Down

0 comments on commit f08d58c

Please sign in to comment.