forked from puppetlabs-operations/puppet-mcollective
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow puppet moduledir spec for mcollective plugins
- Loading branch information
Adrien Thebo
committed
Jun 29, 2012
1 parent
5fbf11e
commit 282afca
Showing
2 changed files
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
define mcollective::plugin($has_ddl = false) { | ||
define mcollective::plugin($has_ddl = false, $module = 'mcollective') { | ||
|
||
include mcollective::params | ||
include mcollective::server | ||
include mcollective::server::pluginbase | ||
|
||
$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 } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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']], | ||
} | ||
} |