diff options
author | mh <mh@immerda.ch> | 2015-10-25 15:06:09 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2015-10-25 15:06:09 +0100 |
commit | edd94dd98f53c1066c7bd6253bc910c196f798fc (patch) | |
tree | 06b19dc503d3988b565f92402251197012263059 /manifests | |
parent | a9a04a8e1aa447d71f8745491da9168c81206392 (diff) |
linting nagios::service::imap
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/service/imap.pp | 22 |
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' { |