Merge branch 'werekraken-el_support' Closes #1
Conflicts: manifests/params.pp
This commit is contained in:
commit
76609ff08a
@ -23,7 +23,7 @@ class nslcd::params {
|
|||||||
$default_service_name = 'nslcd'
|
$default_service_name = 'nslcd'
|
||||||
|
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'debian': {
|
'Debian': {
|
||||||
$config = $default_config
|
$config = $default_config
|
||||||
$package_name = $default_package_name
|
$package_name = $default_package_name
|
||||||
$service_name = $default_service_name
|
$service_name = $default_service_name
|
||||||
@ -33,8 +33,18 @@ class nslcd::params {
|
|||||||
$config_group = 'nslcd'
|
$config_group = 'nslcd'
|
||||||
$config_mode = '0640'
|
$config_mode = '0640'
|
||||||
}
|
}
|
||||||
|
'RedHat': {
|
||||||
|
$config = $default_config
|
||||||
|
$package_name = 'nss-pam-ldapd'
|
||||||
|
$service_name = $default_service_name
|
||||||
|
$uid = 'nslcd'
|
||||||
|
$gid = 'ldap'
|
||||||
|
$config_user = 'root'
|
||||||
|
$config_group = 'root'
|
||||||
|
$config_mode = '0600'
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("the ${module_name} module is not supported on an ${::osfamily} based system.")
|
fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,14 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'nslcd' do
|
describe 'nslcd' do
|
||||||
|
|
||||||
{'Ubuntu' => 'Debian', 'Debian' => 'Debian'}.each do |system, family|
|
{'Ubuntu' => 'Debian', 'Debian' => 'Debian', 'CentOS' => 'RedHat', 'RedHat' => 'RedHat' }.each do |system, family|
|
||||||
context "when on system #{system}" do
|
context "when on system #{system}" do
|
||||||
let :facts do
|
facts = {
|
||||||
{
|
|
||||||
:osfamily => family,
|
:osfamily => family,
|
||||||
:operatingsystem => system,
|
:operatingsystem => system,
|
||||||
}
|
}
|
||||||
|
let :facts do
|
||||||
|
facts
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_class('nslcd') }
|
it { should contain_class('nslcd') }
|
||||||
@ -16,10 +17,19 @@ describe 'nslcd' do
|
|||||||
it { should contain_class('nslcd::config') }
|
it { should contain_class('nslcd::config') }
|
||||||
it { should contain_class('nslcd::service') }
|
it { should contain_class('nslcd::service') }
|
||||||
|
|
||||||
it {
|
|
||||||
should contain_package('nslcd')
|
case facts[:osfamily]
|
||||||
should contain_service('nslcd')
|
when 'Debian'
|
||||||
}
|
it {
|
||||||
|
should contain_package('nslcd')
|
||||||
|
should contain_service('nslcd')
|
||||||
|
}
|
||||||
|
when 'RedHat'
|
||||||
|
it {
|
||||||
|
should contain_package('nss-pam-ldapd')
|
||||||
|
should contain_service('nslcd')
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user