Puppet Class: mcollective::defaults
- Inherited by:
-
mcollective
- Defined in:
- manifests/defaults.pp
Overview
private class This class is for setting the few platform defaults that need branching; all other configuration should be defaulted using the class paramaters to the mcollective class. Never refer to $mcollective::defaults::foo values outside of a parameter list, it’s leak and prevents users from actually having control.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'manifests/defaults.pp', line 7
class mcollective::defaults {
if versioncmp($::puppetversion, '4') < 0 {
$confdir = '/etc/mcollective'
$_core_libdir = $::osfamily ? {
'Debian' => '/usr/share/mcollective/plugins',
'OpenBSD' => '/usr/local/libexec/mcollective',
default => '/usr/libexec/mcollective',
}
# Where this module will sync file-managed plugins to.
# These paths may need revisiting by someone who understands FHS and
# distribution standards for site-specific application-specific
# library paths.
$site_libdir = $::osfamily ? {
'Debian' => '/usr/local/share/mcollective',
'OpenBSD' => regsubst($::rubyversion, '^(\d+)\.(\d+)\.(\d+)$', '/usr/local/lib/ruby/vendor_ruby/\1.\2/mcollective'),
default => '/usr/local/libexec/mcollective',
}
} else {
$confdir = '/etc/puppetlabs/mcollective'
$_core_libdir = '/opt/puppetlabs/mcollective/plugins'
$site_libdir = '/opt/puppetlabs/mcollective'
}
# Since mcollective version 2.8, there is no core libdir
# https://docs.puppetlabs.com/mcollective/releasenotes.html#libdirloadpath-changes-and-core-plugins
$mco_assumed_version = '2.8.5'
$_mco_version = pick_default($::mco_version, $mco_assumed_version)
if ($::osfamily != 'RedHat') and (versioncmp($_mco_version, '2.8') >= 0) {
$core_libdir = undef
} else {
$core_libdir = $_core_libdir
}
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '14.10') <= 0){
$server_daemonize = false # See https://tickets.puppetlabs.com/browse/MCO-167
} else {
$server_daemonize = true
}
if defined('$is_pe') and str2bool($::is_pe) {
$ruby_interpreter = '/opt/puppet/bin/ruby'
} else {
case $::operatingsystem {
'OpenBSD': {
$ruby_interpreter = regsubst($::rubyversion, '^(\d+)\.(\d+)\.(\d+)$', '/usr/local/bin/ruby\1\2')
}
default: {
$ruby_interpreter = '/usr/bin/env ruby'
}
}
}
}
|