1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
define samba::share($ensure=present,
$description,
$path,
$browsable,
$mask,
$guestok="no",
$readonly="no" ) {
$context = "/files/etc/samba/smb.conf"
$target = "target[. = '${name}']"
augeas { "${name}":
context => $context,
changes => $ensure ? {
present => [ "set ${target} ${name}",
"set ${target}/comment ${description}",
"set ${target}/path ${path}",
"set ${target}/browsable ${browsable}",
"set ${target}/mask ${mask}" ],
default => ["rm ${target} ${name}"],
},
require => Class["samba::server::config"]
}
}
|