aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/share.pp
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2012-08-24 14:25:10 -0400
committerAdam Jahn <ajjahn@gmail.com>2012-08-24 14:25:10 -0400
commitb678ff0a00c3c78925accec9de6e135c6e1c0db0 (patch)
treee4a2b28ad934b87eefaa70c6a560e733a02c0cc3 /manifests/server/share.pp
parentc8c08812c1db3d925cde442b33196236b1d42095 (diff)
downloadpuppet-samba-b678ff0a00c3c78925accec9de6e135c6e1c0db0.tar.gz
puppet-samba-b678ff0a00c3c78925accec9de6e135c6e1c0db0.tar.bz2
only allow valid values in boolean options
Diffstat (limited to 'manifests/server/share.pp')
-rw-r--r--manifests/server/share.pp15
1 files changed, 9 insertions, 6 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp
index a40ed46..d9791cb 100644
--- a/manifests/server/share.pp
+++ b/manifests/server/share.pp
@@ -42,8 +42,9 @@ define samba::server::share($ensure = present,
augeas { "${name}-browsable":
context => $context,
changes => $browsable ? {
- default => "set ${target}/browsable ${browsable}",
- '' => "rm ${target}/browsable",
+ true => "set ${target}/browsable yes",
+ false => "set ${target}/browsable no",
+ default => "rm ${target}/browsable",
},
require => Augeas["${name}-section"],
notify => Class["samba::server::service"]
@@ -52,8 +53,9 @@ define samba::server::share($ensure = present,
augeas { "${name}-guest_ok":
context => $context,
changes => $guest_ok ? {
- default => "set \"${target}/guest ok\" ${guest_ok}",
- '' => "rm \"${target}/guest ok\"",
+ true => "set \"${target}/guest ok\" yes",
+ false => "set \"${target}/guest ok\" no",
+ default => "rm \"${target}/guest ok\"",
},
require => Augeas["${name}-section"],
notify => Class["samba::server::service"]
@@ -62,8 +64,9 @@ define samba::server::share($ensure = present,
augeas { "${name}-read_only":
context => $context,
changes => $read_only ? {
- default => "set \"${target}/read only\" ${read_only}",
- '' => "rm \"${target}/read_only\"",
+ true => "set \"${target}/read only\" yes",
+ false => "set \"${target}/read only\" no",
+ default => "rm \"${target}/read_only\"",
},
require => Augeas["${name}-section"],
notify => Class["samba::server::service"]