Puppet Class: psick::pre
- Defined in:
- manifests/pre.pp
Overview
This class includes prerequisite classes, applied before base classes and profiles. Is exposes parameters that allow to define any class (from Psick, public modules or local profiles) to include before anything else. For each different $facts value a differet entrypoint is exposed.
For each of these parameters, is expected an Hash of key - values: keys can have any name, and are used as markers to allow overrides, exceptions management and customisations across Hiera’s hierarchies. values are actual class names to include in the node’s catalog. They can be classes from psick module or any other module, both public ones (the typical component modules from the Forge) and private site profiles and modules.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'manifests/pre.pp', line 63
class psick::pre (
Psick::Class $linux_classes = {},
Psick::Class $windows_classes = {},
Psick::Class $darwin_classes = {},
Psick::Class $solaris_classes = {},
Boolean $manage = $psick::manage,
Boolean $noop_manage = $psick::noop_manage,
Boolean $noop_value = $psick::noop_value,
) {
if $manage {
if $noop_manage {
noop($noop_value)
}
if !empty($linux_classes) and $facts['kernel'] == 'Linux' {
$linux_classes.each |$n,$c| {
if $c != '' {
contain $c
}
}
}
if !empty($windows_classes) and $facts['kernel'] == 'windows' {
$windows_classes.each |$n,$c| {
if $c != '' {
contain $c
}
}
}
if !empty($darwin_classes) and $facts['kernel'] == 'Darwin' {
$darwin_classes.each |$n,$c| {
if $c != '' {
contain $c
}
}
}
if !empty($solaris_classes) and $facts['kernel'] == 'Solaris' {
$solaris_classes.each |$n,$c| {
if $c != '' {
contain $c
}
}
}
}
}
|