Puppet Class: psick::profiles
- Defined in:
- manifests/profiles.pp
Summary
Manage profiles specific to nodes, roles or any other groupOverview
This class includes host/role specific profiles, they are applied after the base classes. Is exposes parameters that allow to define any class (from Psick, public modules or local profiles) to include as profile. For each different $facts value a differet entrypoint is exposed.
For each of these $facts_classes parameters, it’s 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.
59 60 61 62 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 |
# File 'manifests/profiles.pp', line 59
class psick::profiles (
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 !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
}
}
}
}
}
|