summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2015-10-25 15:06:09 +0100
committermh <mh@immerda.ch>2015-10-25 15:06:09 +0100
commitedd94dd98f53c1066c7bd6253bc910c196f798fc (patch)
tree06b19dc503d3988b565f92402251197012263059 /manifests
parenta9a04a8e1aa447d71f8745491da9168c81206392 (diff)
linting nagios::service::imap
Diffstat (limited to 'manifests')
-rw-r--r--manifests/service/imap.pp22
1 files changed, 12 insertions, 10 deletions
diff --git a/manifests/service/imap.pp b/manifests/service/imap.pp
index b703db4..45b667a 100644
--- a/manifests/service/imap.pp
+++ b/manifests/service/imap.pp
@@ -1,24 +1,26 @@
+# check an imap service
define nagios::service::imap(
- $ensure = 'present',
- $host = 'absent',
- $port = '143',
- $tls = true,
- $tls_port = '993'
+ $ensure = 'present',
+ $host = 'absent',
+ $port = '143',
+ $tls = true,
+ $tls_port = '993'
){
$real_host = $host ? {
'absent' => $name,
- default => $host
+ default => $host
}
+ $tls_ensure = $tls ? {
+ true => $ensure,
+ default => 'absent'
+ }
nagios::service{
"imap_${name}_${port}":
ensure => $ensure;
"imaps_${name}_${tls_port}":
- ensure => $tls ? {
- true => $ensure,
- default => 'absent'
- };
+ ensure => $tls_ensure;
}
if $ensure != 'absent' {