I'm guessing that the problem is in
example42/mcollective/manifests/init.pp...
class mcollective (
$install_dependencies = params_lookup( 'install_dependencies' ),
$stomp_host = params_lookup( 'stomp_host' ),
$stomp_port = params_lookup( 'stomp_port' ),
$stomp_user = params_lookup( 'stomp_user' ),
$stomp_password = params_lookup( 'stomp_password' ),
$stomp_admin = params_lookup( 'stomp_admin' ),
$stomp_admin_password = params_lookup( 'stomp_admin_password' ),
$install_client = params_lookup( 'install_client' ),
$install_stomp_server = params_lookup( 'install_stomp_server' ),
$install_plugins = params_lookup( 'install_plugins' ),
$psk = params_lookup( 'psk' ),
$package_client = params_lookup( 'package_client' ),
$config_file_client = params_lookup( 'config_file_client' ),
$template_client = params_lookup( 'template_client' ),
$template_stomp_server = params_lookup( 'template_stomp_server' ),
$my_class = params_lookup( 'my_class' ),
$source = params_lookup( 'source' ),
$source_dir = params_lookup( 'source_dir' ),
$source_dir_purge = params_lookup( 'source_dir_purge' ),
$template = params_lookup( 'template' ),
$service_autorestart = params_lookup( 'service_autorestart' , 'global' ),
$options = params_lookup( 'options' ),
$version = params_lookup( 'version' ),
$absent = params_lookup( 'absent' ),
$disable = params_lookup( 'disable' ),
$disableboot = params_lookup( 'disableboot' ),
$monitor = params_lookup( 'monitor' , 'global' ),
$monitor_tool = params_lookup( 'monitor_tool' , 'global' ),
$monitor_target = params_lookup( 'monitor_target' , 'global' ),
$puppi = params_lookup( 'puppi' , 'global' ),
$puppi_helper = params_lookup( 'puppi_helper' , 'global' ),
$firewall = params_lookup( 'firewall' , 'global' ),
$firewall_tool = params_lookup( 'firewall_tool' , 'global' ),
$firewall_src = params_lookup( 'firewall_src' , 'global' ),
$firewall_dst = params_lookup( 'firewall_dst' , 'global' ),
$debug = params_lookup( 'debug' , 'global' ),
$audit_only = params_lookup( 'audit_only' , 'global' ),
$package = params_lookup( 'package' ),
$service = params_lookup( 'service' ),
$service_status = params_lookup( 'service_status' ),
$process = params_lookup( 'process' ),
$process_args = params_lookup( 'process_args' ),
$process_user = params_lookup( 'process_user' ),
$config_dir = params_lookup( 'config_dir' ),
$config_file = params_lookup( 'config_file' ),
$config_file_mode = params_lookup( 'config_file_mode' ),
$config_file_owner = params_lookup( 'config_file_owner' ),
$config_file_group = params_lookup( 'config_file_group' ),
$config_file_init = params_lookup( 'config_file_init' ),
$pid_file = params_lookup( 'pid_file' ),
$data_dir = params_lookup( 'data_dir' ),
$log_dir = params_lookup( 'log_dir' ),
$log_file = params_lookup( 'log_file' ),
$port = params_lookup( 'port' ),
$protocol = params_lookup( 'protocol' )
) inherits mcollective::params {
$bool_install_dependencies =any2bool($install_dependencies )
$bool_source_dir_purge=any2bool($source_dir_purge)
$bool_service_autorestart=any2bool($service_autorestart)
$bool_absent=any2bool($absent)
$bool_disable=any2bool($disable)
$bool_disableboot=any2bool($disableboot)
$bool_monitor=any2bool($monitor)
$bool_puppi=any2bool($puppi)
$bool_firewall=any2bool($firewall)
$bool_debug=any2bool($debug)
$bool_audit_only=any2bool($audit_only)
$bool_install_client=any2bool($install_client)
$bool_install_stomp_server=any2bool($install_stomp_server)
$bool_install_plugins=any2bool($install_plugins)
### Definition of some variables used in the module
$manage_package = $mcollective::bool_absent ? {
true => 'absent',
false => $mcollective::version,
}
$manage_service_enable = $mcollective::bool_disableboot ? {
true => false,
default => $mcollective::bool_disable ? {
true => false,
default => $mcollective::bool_absent ? {
true => false,
false => true,
},
},
}
$manage_service_ensure = $mcollective::bool_disable ? {
true => 'stopped',
default => $mcollective::bool_absent ? {
true => 'stopped',
default => 'running',
},
}
$manage_service_autorestart = $mcollective::bool_service_autorestart ? {
true => Service[mcollective],
false => undef,
}
$manage_file = $mcollective::bool_absent ? {
true => 'absent',
default => 'present',
}
if $mcollective::bool_absent == true
or $mcollective::bool_disable == true
or $mcollective::bool_disableboot == true {
$manage_monitor = false
} else {
$manage_monitor = true
}
if $mcollective::bool_absent == true
or $mcollective::bool_disable == true {
$manage_firewall = false
} else {
$manage_firewall = true
}
$manage_audit = $mcollective::bool_audit_only ? {
true => 'all',
false => undef,
}
$manage_file_replace = $mcollective::bool_audit_only ? {
true => false,
false => true,
}
$manage_file_source = $mcollective::source ? {
'' => undef,
default => $mcollective::source,
}
# A default template is provided if $mcollective::stomp_host is
# set and no $mcollective::source or $mcollective::template
# is explicitely set
$manage_file_content = $mcollective::template ? {
'' => $mcollective::source ? {
'' => $mcollective::stomp_host ? {
'' => undef,
default => template('mcollective/server.cfg.erb'),
},
default => undef,
},
default => template($mcollective::template),
}
$manage_file_content_client = $mcollective::template_client ? {
'' => template('mcollective/client.cfg.erb'),
default => template($mcollective::template_client),
}
### Managed resources
package { $mcollective::package:
ensure => $mcollective::manage_package,
}
service { 'mcollective':
ensure => $mcollective::manage_service_ensure,
name => $mcollective::service,
enable => $mcollective::manage_service_enable,
hasstatus => $mcollective::service_status,
pattern => $mcollective::process,
require => Package[$mcollective::package],
}
file { 'mcollective.conf':
ensure => $mcollective::manage_file,
path => $mcollective::config_file,
mode => $mcollective::config_file_mode,
owner => $mcollective::config_file_owner,
group => $mcollective::config_file_group,
require => Package[$mcollective::package],
notify => $mcollective::manage_service_autorestart,
source => $mcollective::manage_file_source,
content => $mcollective::manage_file_content,
replace => $mcollective::manage_file_replace,
audit => $mcollective::manage_audit,
}
# The whole mcollective configuration directory can be recursively
overriden
if $mcollective::source_dir {
file { 'mcollective.dir':
ensure => directory,
path => $mcollective::config_dir,
require => Package[$mcollective::package],
notify => $mcollective::manage_service_autorestart,
source => $mcollective::source_dir,
recurse => true,
purge => $mcollective::bool_source_dir_purge,
replace => $mcollective::manage_file_replace,
audit => $mcollective::manage_audit,
}
}
### Include custom class if $my_class is set
if $mcollective::my_class {
include $mcollective::my_class
}
### Include mcollective client if $install_client == true
if $mcollective::bool_install_client == true {
include mcollective::client
}
### Include Stomp Server (ActiveMQ) if $install_stomp_server == true
if $mcollective::bool_install_stomp_server == true {
include mcollective::stomp_server
}
### Include Mcollective Plugins
if $mcollective::bool_install_plugins == true {
include mcollective::plugins
}
### Provide puppi data, if enabled ( puppi => true )
if $mcollective::bool_puppi == true {
$classvars=get_class_args()
puppi::ze { 'mcollective':
ensure => $mcollective::manage_file,
variables => $classvars,
filter => '.*content.*|.*password.*|.*psk.*',
helper => $mcollective::puppi_helper,
}
# Mcollective puppi plugin
include puppi::mcollective::server
}
### Service monitoring, if enabled ( monitor => true )
if $mcollective::bool_monitor == true {
monitor::port {
"mcollective_stomp_${mcollective::stomp_host}_${mcollective::stomp_port}":
protocol => $mcollective::protocol,
port => $mcollective::stomp_port,
target => $mcollective::stomp_host,
tool => $mcollective::monitor_tool,
checksource => 'local',
enable => $mcollective::manage_monitor,
}
monitor::process { 'mcollective_process':
process => $mcollective::process,
service => $mcollective::service,
pidfile => $mcollective::pid_file,
user => $mcollective::process_user,
argument => $mcollective::process_args,
tool => $mcollective::monitor_tool,
enable => $mcollective::manage_monitor,
}
}
### Firewall management, if enabled ( firewall => true )
if $mcollective::bool_firewall == true {
firewall { "mcollective_${mcollective::protocol}_${mcollective::port}":
source => $mcollective::firewall_src,
destination => $mcollective::firewall_dst,
protocol => $mcollective::protocol,
port => $mcollective::port,
action => 'allow',
direction => 'input',
tool => $mcollective::firewall_tool,
enable => $mcollective::manage_firewall,
}
}
### Debugging, if enabled ( debug => true )
if $mcollective::bool_debug == true {
file { 'debug_mcollective':
ensure => $mcollective::manage_file,
path => "${settings::vardir}/debug-mcollective",
mode => '0640',
owner => 'root',
group => 'root',
content => inline_template('<%= scope.to_hash.reject { |k,v| k.to_s
=~ /(uptime.*|path|timestamp|free|.*password.*|.*psk.*|.*key)/ }.to_yaml
%>'),
}
}
### Yaml based fact source for mcollective.
file { 'facts.yaml':
ensure => $mcollective::manage_file,
path => "${mcollective::config_dir}/facts.yaml",
mode => '0400',
owner => 'root',
group => 'root',
require => Package[$mcollective::package],
loglevel => debug, # this is needed to avoid it being logged and
reported on every run
# avoid including highly-dynamic facts as they will cause unnecessary
template writes
content => inline_template('<%= scope.to_hash.reject { |k,v| k.to_s =~
/(uptime.*|last_run|manage_file_content|classvars|path|timestamp|free|.*password.*|.*psk.*|.*key)/
}.to_yaml %>'),
}
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.