Puppet Class: psick::postfix::tp
- Defined in:
- manifests/postfix/tp.pp
Summary
This psick profile manages postfix with Tiny Puppet (tp)Overview
DEPRECATION NOTICE: This profile has been deprecated. It will be removed on version 1.0.0 of psick module. Use equivalent class tp_profile::postfix in the tp_profile module as replacement
57 58 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'manifests/postfix/tp.pp', line 57
class psick::postfix::tp (
Psick::Ensure $ensure = 'present',
Boolean $manage = $::psick::manage,
Hash $resources_hash = {},
Hash $resources_auto_conf_hash = {},
Hash $install_hash = {},
Hash $options_hash = {},
Hash $options_auto_conf_hash = {},
Hash $settings_hash = {},
Boolean $auto_prereq = $::psick::auto_prereq,
Boolean $no_noop = false,
) {
if $manage {
notify { 'Deprecated profile psick::postfix::tp':
message => 'This profile has been deprecated. It will be removed on version 1.0.0 of psick module. Use equivalent class tp_profile::postfix in the tp_profile module as replacement',
}
if !$::psick::noop_mode and $no_noop {
info('Forced no-noop mode in psick::postfix::tp')
noop(false)
}
$options_all = $options_auto_conf_hash + $options_hash
$install_defaults = {
ensure => $ensure,
options_hash => $options_all,
settings_hash => $settings_hash,
auto_repo => $auto_prereq,
auto_prereq => $auto_prereq,
}
tp::install { 'postfix':
* => $install_defaults + $install_hash,
}
# tp::conf iteration based on $resources_hash['tp::conf']
$file_ensure = $ensure ? {
'absent' => 'absent',
default => 'present',
}
$conf_defaults = {
ensure => $file_ensure,
options_hash => $options_all,
settings_hash => $settings_hash,
}
$tp_confs = pick($resources_auto_conf_hash['tp::conf'], {}) + pick($resources_hash['tp::conf'], {})
# All the tp::conf defines declared here
$tp_confs.each | $k,$v | {
tp::conf { $k:
* => $conf_defaults + $v,
}
}
# tp::dir iteration on $resources_hash['tp::dir']
$dir_defaults = {
ensure => $file_ensure,
settings_hash => $settings_hash,
}
# All the tp::dir defines declared here
$tp_dirs = pick($resources_auto_conf_hash['tp::dir'], {}) + pick($resources_hash['tp::dir'], {})
$tp_dirs.each | $k,$v | {
tp::dir { $k:
* => $dir_defaults + $v,
}
}
}
}
|