From: Peter Palfrader Date: Tue, 10 Sep 2019 07:10:17 +0000 (+0200) Subject: rsync::site: typecheck $ensure parameter X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=8bd49dd6beed6882b1768bf1ea802f52d9fdc085;p=mirror%2Fdsa-puppet.git rsync::site: typecheck $ensure parameter --- diff --git a/modules/rsync/manifests/site.pp b/modules/rsync/manifests/site.pp index 8035dd491..c762d6d37 100644 --- a/modules/rsync/manifests/site.pp +++ b/modules/rsync/manifests/site.pp @@ -3,7 +3,7 @@ define rsync::site ( $source=undef, $content=undef, $max_clients=200, - $ensure=present, + Enum['present','absent'] $ensure = 'present', $sslname=undef, ) { include rsync @@ -11,11 +11,6 @@ define rsync::site ( $fname_real_rsync = "/etc/rsyncd-${name}.conf" $fname_real_stunnel = "/etc/rsyncd-${name}-stunnel.conf" - case $ensure { - present,absent: {} - default: { fail ( "Invald ensure `${ensure}' for ${name}" ) } - } - $ensure_service = $ensure ? { present => running, absent => stopped,