From db21d4cdaedbe63674bb837ce7a70c310919cd0a Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Tue, 30 Jul 2013 15:13:49 +0000 Subject: Fix package names for rhel/centos using ads security RHEL/CentOS use krb5-workstation instead of krb5-user as well as samba-winbind instead of winbind package names. --- manifests/server/ads.pp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/manifests/server/ads.pp b/manifests/server/ads.pp index 1f8e602..ea6523d 100644 --- a/manifests/server/ads.pp +++ b/manifests/server/ads.pp @@ -25,10 +25,19 @@ class samba::server::ads($ensure = present, $map_readonly = 'no', $target_ou = 'Nix_Mashine') { + $krb5_user_package = $osfamily ? { + 'RedHat' => 'krb5-workstation', + default => 'krb5-user', + } + $winbind_package = $osfamily ? { + 'RedHat' => 'samba-winbind', + default => 'winbind', + } + package{ - 'krb5-user': ensure => installed; - 'winbind': ensure => installed; - 'expect': ensure => installed; + $krb5_user_package: ensure => installed; + $winbind_package: ensure => installed; + 'expect': ensure => installed; } include samba::server::config @@ -88,7 +97,7 @@ class samba::server::ads($ensure = present, group => root, mode => "0755", content => template("${module_name}/verify_active_directory.erb"), - require => [ Package['krb5-user', 'winbind', 'expect'], + require => [ Package[$krb5_user_package, $winbind_package, 'expect'], Augeas['samba-realm', 'samba-security', 'samba-winbind enum users', 'samba-winbind enum groups', 'samba-winbind uid', 'samba-winbind gid', 'samba-winbind use default domain'] ], @@ -101,7 +110,7 @@ class samba::server::ads($ensure = present, group => root, mode => "0755", content => template("${module_name}/configure_active_directory.erb"), - require => [ Package['krb5-user', 'winbind', 'expect'], + require => [ Package[$krb5_user_package, $winbind_package, 'expect'], Augeas['samba-realm', 'samba-security', 'samba-winbind enum users', 'samba-winbind enum groups', 'samba-winbind uid', 'samba-winbind gid', 'samba-winbind use default domain'] ], -- cgit v1.2.3 From 6878e0a98ed5922b2a76f2e6f5bfb4d0df611762 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Sun, 1 Sep 2013 10:10:15 +0000 Subject: samba-common winbind package for rhel5 --- manifests/server/ads.pp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/manifests/server/ads.pp b/manifests/server/ads.pp index ea6523d..8ca8d45 100644 --- a/manifests/server/ads.pp +++ b/manifests/server/ads.pp @@ -29,9 +29,15 @@ class samba::server::ads($ensure = present, 'RedHat' => 'krb5-workstation', default => 'krb5-user', } - $winbind_package = $osfamily ? { - 'RedHat' => 'samba-winbind', - default => 'winbind', + + if $osfamily == "RedHat" { + if $operatingsystemrelease =~ /^6\./) { + $winbind_package = 'samba-winbind' + } else { + $winbind_package = 'samba-common' + } + } else { + $winbind_package = 'winbind' } package{ -- cgit v1.2.3 From 5ffe04fc605044cf0037a67c334121c68cc0608e Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Sun, 1 Sep 2013 10:11:23 +0000 Subject: Removed extreneous closing parenthesis --- manifests/server/ads.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/server/ads.pp b/manifests/server/ads.pp index 8ca8d45..16be9ad 100644 --- a/manifests/server/ads.pp +++ b/manifests/server/ads.pp @@ -31,7 +31,7 @@ class samba::server::ads($ensure = present, } if $osfamily == "RedHat" { - if $operatingsystemrelease =~ /^6\./) { + if $operatingsystemrelease =~ /^6\./ { $winbind_package = 'samba-winbind' } else { $winbind_package = 'samba-common' -- cgit v1.2.3