projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch postfix smarthost config to classparams
[mirror/dsa-puppet.git]
/
modules
/
postfix
/
manifests
/
init.pp
diff --git
a/modules/postfix/manifests/init.pp
b/modules/postfix/manifests/init.pp
index
88591a9
..
000522d
100644
(file)
--- a/
modules/postfix/manifests/init.pp
+++ b/
modules/postfix/manifests/init.pp
@@
-1,10
+1,23
@@
+# postfix class
+# @param use_smarthost use the smarthost
+# @param smarthost host to relay through (if set and use_smarthost)
class postfix(
class postfix(
+ Optional[String] $smarthost,
+ Boolean $use_smarthost = true,
Boolean $manage_maincf = true,
) {
package { 'postfix':
ensure => installed
}
Boolean $manage_maincf = true,
) {
package { 'postfix':
ensure => installed
}
+ if $use_smarthost {
+ if ! smarthost {
+ fail('No smarthost set but use_smarthost is true')
+ }
+ } else {
+ $heavy = true
+ }
+
service { 'postfix':
ensure => running
}
service { 'postfix':
ensure => running
}