]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
Add parameter to disable automatic join of domain
authorPhilipp Tölke <pt@philipptoelke.de>
Thu, 9 Jun 2016 13:44:11 +0000 (15:44 +0200)
committerfos4X root <root@fos4x.de>
Thu, 9 Jun 2016 13:44:11 +0000 (15:44 +0200)
manifests/server/ads.pp

index 757d09152ce8c2c054771bceeb0c53df268c4005..d7d462c7a57e722fbc2c90f15a70bec9bf50d95c 100644 (file)
@@ -21,7 +21,8 @@ class samba::server::ads($ensure = present,
   $map_system                 = 'no',
   $map_archive                = 'no',
   $map_readonly               = 'no',
-  $target_ou                  = 'Nix_Mashine') {
+  $target_ou                  = 'Nix_Mashine',
+  $perform_join               = true) {
 
   $krb5_user_package = $::osfamily ? {
     'RedHat' => 'krb5-workstation',
@@ -122,10 +123,12 @@ class samba::server::ads($ensure = present,
         'samba-winbind use default domain'], Service['winbind'] ],
   }
 
-  exec {'join-active-directory':
-    # join the domain configured in samba.conf
-    command => '/sbin/configure_active_directory -j',
-    unless  => '/sbin/verify_active_directory',
-    require => [ File['configure_active_directory', 'verify_active_directory'], Service['winbind'] ],
+  if ($perform_join) {
+    exec {'join-active-directory':
+      # join the domain configured in samba.conf
+      command => '/sbin/configure_active_directory -j',
+      unless  => '/sbin/verify_active_directory',
+      require => [ File['configure_active_directory', 'verify_active_directory'], Service['winbind'] ],
+    }
   }
 }