aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/server.pp13
1 files changed, 12 insertions, 1 deletions
diff --git a/manifests/server.pp b/manifests/server.pp
index b8e94b0..b3de661 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -1,4 +1,5 @@
-class samba::server($server_string = '',
+class samba::server($interfaces = '',
+ $server_string = '',
$workgroup = '') {
include samba::server::install
@@ -15,6 +16,16 @@ class samba::server($server_string = '',
notify => Class['samba::server::service']
}
+ augeas { 'global-interfaces':
+ context => $context,
+ changes => $interfaces ? {
+ default => ["set \"${target}/interfaces\" '$interfaces'", "set \"${target}/bind interfaces only\" yes"],
+ '' => ["rm \"${target}/interfaces\"", "rm \"${target}/bind interfaces only\""],
+ },
+ require => Augeas['global-section'],
+ notify => Class['samba::server::service']
+ }
+
augeas { 'global-server_string':
context => $context,
changes => $server_string ? {