diff options
author | Adam Jahn <ajjahn@gmail.com> | 2014-01-10 15:29:05 -0800 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2014-01-10 15:29:05 -0800 |
commit | 406d7f163269954cab6e5690f6f7015a0b3e6020 (patch) | |
tree | 4ef4fef8b4d59f1dbac3de024f663a78d7a32f5d /manifests | |
parent | e1f6fd1859b69198fafd9a3abe7112e4717156fe (diff) | |
parent | 5ffe04fc605044cf0037a67c334121c68cc0608e (diff) | |
download | puppet-samba-406d7f163269954cab6e5690f6f7015a0b3e6020.tar.gz puppet-samba-406d7f163269954cab6e5690f6f7015a0b3e6020.tar.bz2 |
Merge pull request #15 from tomas-edwardsson/rhel6ads
Fix package names for rhel/centos using ads security
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/server/ads.pp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/manifests/server/ads.pp b/manifests/server/ads.pp index 1f8e602..16be9ad 100644 --- a/manifests/server/ads.pp +++ b/manifests/server/ads.pp @@ -25,10 +25,25 @@ class samba::server::ads($ensure = present, $map_readonly = 'no', $target_ou = 'Nix_Mashine') { + $krb5_user_package = $osfamily ? { + 'RedHat' => 'krb5-workstation', + default => 'krb5-user', + } + + if $osfamily == "RedHat" { + if $operatingsystemrelease =~ /^6\./ { + $winbind_package = 'samba-winbind' + } else { + $winbind_package = 'samba-common' + } + } else { + $winbind_package = '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 +103,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 +116,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'] ], |