diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f85cc28..7004bfa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,4 +1,4 @@ -define mcollective::plugin($has_ddl = false) { +define mcollective::plugin($has_ddl = false, $module = 'mcollective') { include mcollective::params include mcollective::server @@ -6,19 +6,17 @@ $filebase = "${mcollective::params::libdir}/mcollective/${name}" - # This assumes that we're only going to install vendored plugins. This is - # fucking silly and lazy. file { "${filebase}.rb": ensure => present, mode => '0644', owner => 'root', group => 'root', - source => "puppet:///modules/mcollective/plugins/${name}.rb", + source => "puppet:///modules/${module}/plugins/${name}.rb", before => Package['mcollective'], notify => Service['mcollective'], } if $has_ddl { - mcollective::plugin::ddl { $name: } + mcollective::plugin::ddl { $name: module => $module } } } diff --git a/manifests/plugin/ddl.pp b/manifests/plugin/ddl.pp index 8001323..e3683ee 100644 --- a/manifests/plugin/ddl.pp +++ b/manifests/plugin/ddl.pp @@ -1,11 +1,11 @@ # Allow plugins and DDLs to be shipped separately if desired -define mcollective::plugin::ddl { +define mcollective::plugin::ddl($module = 'mcollective') { file { "${filebase}.ddl": ensure => present, mode => '0644', owner => 'root', group => 'root', - source => "puppet:///modules/mcollective/plugins/${name}.ddl", + source => "puppet:///modules/${module}/plugins/${name}.ddl", before => [Package['mcollective'], Service['mcollective']], } }