aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2014-08-14 10:43:31 -0400
committerAdam Jahn <ajjahn@gmail.com>2014-08-14 10:43:31 -0400
commit949880cd9acd5d742ebd3bf361aef896e8d84477 (patch)
treeddc2ebc51efee110e6de8c50ab578ebc4de20103 /manifests/server
parent4a6081761c574525ef6aadd213a95621d077081e (diff)
parent1790f0f59f824638f5baf77c1c899c7084ebe861 (diff)
downloadpuppet-samba-949880cd9acd5d742ebd3bf361aef896e8d84477.tar.gz
puppet-samba-949880cd9acd5d742ebd3bf361aef896e8d84477.tar.bz2
Merge pull request #29 from honzik666/future-parser-fixes
Future parser fixes
Diffstat (limited to 'manifests/server')
-rw-r--r--manifests/server/option.pp4
-rw-r--r--manifests/server/service.pp16
-rw-r--r--manifests/server/share.pp26
3 files changed, 23 insertions, 23 deletions
diff --git a/manifests/server/option.pp b/manifests/server/option.pp
index 36968fc..699985d 100644
--- a/manifests/server/option.pp
+++ b/manifests/server/option.pp
@@ -4,8 +4,8 @@ define samba::server::option ( $value = '' ) {
$target = $samba::server::target
$changes = $value ? {
- default => "set \"${target}/$name\" \"$value\"",
'' => "rm ${target}/$name",
+ default => "set \"${target}/$name\" \"$value\"",
}
augeas { "samba-$name":
@@ -16,4 +16,4 @@ define samba::server::option ( $value = '' ) {
require => Augeas['global-section'],
notify => Class['Samba::Server::Service']
}
-} \ No newline at end of file
+}
diff --git a/manifests/server/service.pp b/manifests/server/service.pp
index 6f26a6d..9ad5fb0 100644
--- a/manifests/server/service.pp
+++ b/manifests/server/service.pp
@@ -1,25 +1,25 @@
class samba::server::service ($ensure = running, $enable = true) {
case $::osfamily {
- Redhat: { $service_name = 'smb' }
+ 'Redhat': { $service_name = 'smb' }
#On Debian family: Debian 7 => samba , Ubuntu => smbd
#Others, I don't know, hope 'samba' will works
- Debian: {
+ 'Debian': {
case $::operatingsystem{
- Debian: { $service_name = 'samba' }
- Ubuntu: { $service_name = 'smbd'}
+ 'Debian': { $service_name = 'samba' }
+ 'Ubuntu': { $service_name = 'smbd'}
default: { $service_name='samba'}
}
}
- Gentoo: { $service_name = 'samba' }
- Archlinux: { $service_name = 'smbd' }
+ 'Gentoo': { $service_name = 'samba' }
+ 'Archlinux': { $service_name = 'smbd' }
# Currently Gentoo has $::osfamily = "Linux". This should change in
# Factor 1.7.0 <http://projects.puppetlabs.com/issues/17029>, so
# adding workaround.
- Linux: {
+ 'Linux': {
case $::operatingsystem {
- Gentoo: { $service_name = 'samba' }
+ 'Gentoo': { $service_name = 'samba' }
default: { fail("$::operatingsystem is not supported by this module.") }
}
}
diff --git a/manifests/server/share.pp b/manifests/server/share.pp
index b7d451f..b228818 100644
--- a/manifests/server/share.pp
+++ b/manifests/server/share.pp
@@ -57,36 +57,36 @@ define samba::server::share($ensure = present,
'' => "rm \"${target}/comment\"",
},
$copy ? {
- default => "set \"${target}/copy\" '${copy}'",
'' => "rm \"${target}/copy\"",
+ default => "set \"${target}/copy\" '${copy}'",
},
$create_mask ? {
- default => "set \"${target}/create mask\" '${create_mask}'",
'' => "rm \"${target}/create mask\"",
+ default => "set \"${target}/create mask\" '${create_mask}'",
},
$directory_mask ? {
- default => "set \"${target}/directory mask\" '${directory_mask}'",
'' => "rm \"${target}/directory mask\"",
+ default => "set \"${target}/directory mask\" '${directory_mask}'",
},
$force_create_mask ? {
- default => "set \"${target}/force create mask\" '${force_create_mask}'",
'' => "rm \"${target}/force create mask\"",
+ default => "set \"${target}/force create mask\" '${force_create_mask}'",
},
$force_directory_mask ? {
- default => "set \"${target}/force directory mask\" '${force_directory_mask}'",
'' => "rm \"${target}/force directory mask\"",
+ default => "set \"${target}/force directory mask\" '${force_directory_mask}'",
},
$force_group ? {
- default => "set \"${target}/force group\" '${force_group}'",
'' => "rm \"${target}/force group\"",
+ default => "set \"${target}/force group\" '${force_group}'",
},
$force_user ? {
- default => "set \"${target}/force user\" '${force_user}'",
'' => "rm \"${target}/force user\"",
+ default => "set \"${target}/force user\" '${force_user}'",
},
$guest_account ? {
- default => "set \"${target}/guest account\" '${guest_account}'",
'' => "rm \"${target}/guest account\"",
+ default => "set \"${target}/guest account\" '${guest_account}'",
},
$guest_ok ? {
true => "set \"${target}/guest ok\" yes",
@@ -136,8 +136,8 @@ define samba::server::share($ensure = present,
augeas { "${name}-valid_users":
context => $context,
changes => $valid_users ? {
- default => "set \"${target}/valid users\" '${valid_users}'",
'' => "rm \"${target}/valid users\"",
+ default => "set \"${target}/valid users\" '${valid_users}'",
},
require => Augeas["${name}-section"],
notify => Class['samba::server::service']
@@ -146,8 +146,8 @@ define samba::server::share($ensure = present,
augeas { "${name}-op_locks":
context => $context,
changes => $op_locks ? {
- default => "set \"${target}/oplocks\" '${op_locks}'",
'' => "rm \"${target}/oplocks\"",
+ default => "set \"${target}/oplocks\" '${op_locks}'",
},
require => Augeas["${name}-section"],
notify => Class['samba::server::service']
@@ -155,8 +155,8 @@ define samba::server::share($ensure = present,
augeas { "${name}-level2_oplocks":
context => $context,
changes => $level2_oplocks ? {
- default => "set \"${target}/level2 oplocks\" '${level2_oplocks}'",
'' => "rm \"${target}/level2 oplocks\"",
+ default => "set \"${target}/level2 oplocks\" '${level2_oplocks}'",
},
require => Augeas["${name}-section"],
notify => Class['samba::server::service']
@@ -164,8 +164,8 @@ define samba::server::share($ensure = present,
augeas { "${name}-veto_oplock_files":
context => $context,
changes => $veto_oplock_files ? {
- default => "set \"${target}/veto oplock files\" '${veto_oplock_files}'",
'' => "rm \"${target}/veto oplock files\"",
+ default => "set \"${target}/veto oplock files\" '${veto_oplock_files}'",
},
require => Augeas["${name}-section"],
notify => Class['samba::server::service']
@@ -173,8 +173,8 @@ define samba::server::share($ensure = present,
augeas { "${name}-write_list":
context => $context,
changes => $write_list ? {
- default => "set \"${target}/write list\" '${write_list}'",
'' => "rm \"${target}/write list\"",
+ default => "set \"${target}/write list\" '${write_list}'",
},
require => Augeas["${name}-section"],
notify => Class['samba::server::service']