aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2014-01-20 08:22:57 -0800
committerAdam Jahn <ajjahn@gmail.com>2014-01-20 08:22:57 -0800
commitcefcad0c6e291d436a84939b257de9f32964534f (patch)
tree4e2d2dce49a8c3122f4aec82c3eb72bd98cc4b35 /manifests/server
parent7d0c9a893efae039252e754ed7750b4bcdf25f9a (diff)
parentf321b3a1e0fbed665ef92776dffb1abb064a9f84 (diff)
downloadpuppet-samba-cefcad0c6e291d436a84939b257de9f32964534f.tar.gz
puppet-samba-cefcad0c6e291d436a84939b257de9f32964534f.tar.bz2
Merge pull request #23 from megabass/samba_server_option
moved set_samba_option to own file an renamed it to samba::server::option
Diffstat (limited to 'manifests/server')
-rw-r--r--manifests/server/ads.pp30
-rw-r--r--manifests/server/option.pp19
2 files changed, 35 insertions, 14 deletions
diff --git a/manifests/server/ads.pp b/manifests/server/ads.pp
index cadfee0..3d44af6 100644
--- a/manifests/server/ads.pp
+++ b/manifests/server/ads.pp
@@ -49,21 +49,23 @@ class samba::server::ads($ensure = present,
include samba::server::config
include samba::server::winbind
- $signal = 'samba::server::winbind'
+ # notify winbind
+ samba::server::option {
+ 'realm': value => $realm,
+ notify => Class['Samba::Server::Winbind'];
+ 'winbind uid': value => $winbind_uid,
+ notify => Class['Samba::Server::Winbind'];
+ 'winbind gid': value => $winbind_gid,
+ notify => Class['Samba::Server::Winbind'];
+ 'winbind enum groups': value => $winbind_enum_groups,
+ notify => Class['Samba::Server::Winbind'];
+ 'winbind enum users': value => $winbind_enum_users,
+ notify => Class['Samba::Server::Winbind'];
+ 'winbind use default domain': value => $winbind_use_default_domain,
+ notify => Class['Samba::Server::Winbind'];
+ }
- set_samba_option {
- 'realm': value => $realm,
- signal => $signal;
- 'winbind uid': value => $winbind_uid,
- signal => $signal;
- 'winbind gid': value => $winbind_gid,
- signal => $signal;
- 'winbind enum groups': value => $winbind_enum_groups,
- signal => $signal;
- 'winbind enum users': value => $winbind_enum_users,
- signal => $signal;
- 'winbind use default domain': value => $winbind_use_default_domain,
- signal => $signal;
+ samba::server::option {
'acl group control': value => $acl_group_control;
'map acl inherit': value => $map_acl_inherit;
'inherit acls': value => $inherit_acls;
diff --git a/manifests/server/option.pp b/manifests/server/option.pp
new file mode 100644
index 0000000..36968fc
--- /dev/null
+++ b/manifests/server/option.pp
@@ -0,0 +1,19 @@
+define samba::server::option ( $value = '' ) {
+ $incl = $samba::server::incl
+ $context = $samba::server::context
+ $target = $samba::server::target
+
+ $changes = $value ? {
+ default => "set \"${target}/$name\" \"$value\"",
+ '' => "rm ${target}/$name",
+ }
+
+ augeas { "samba-$name":
+ incl => $incl,
+ lens => 'Samba.lns',
+ context => $context,
+ changes => $changes,
+ require => Augeas['global-section'],
+ notify => Class['Samba::Server::Service']
+ }
+} \ No newline at end of file