Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Fedora 25 and 26 releases #44

Merged
merged 6 commits into from
Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 54 additions & 31 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,64 @@

'RedHat': {

$sssd_package = 'sssd'
$sssd_service = 'sssd'
$service_ensure = 'running'
$config_file = '/etc/sssd/sssd.conf'
$mkhomedir = true
$sssd_package = 'sssd'
$sssd_service = 'sssd'
$service_ensure = 'running'
$config_file = '/etc/sssd/sssd.conf'
$mkhomedir = true

case $::operatingsystemrelease {
case $::operatingsystem {
default: {
fail("operatingsystemrelease is <${::operatingsystemrelease}> and must be in 5, 6 or 7.")
}
/^5/: {
$service_dependencies = ['messagebus']
$extra_packages = [
'authconfig',
]
$extra_packages_ensure = 'latest'
$manage_oddjobd = false
fail("operatingsystem is <${::operatingsystem}> which is not supported")
}
/^6/: {
$service_dependencies = ['messagebus']
$extra_packages = [
'authconfig',
'oddjob-mkhomedir',
]
$extra_packages_ensure = 'present'
$manage_oddjobd = true
'RedHat', 'CentOS': {
case $::operatingsystemmajrelease {
default: {
fail("operatingsystemrelease is <${::operatingsystemrelease}> and must be in 5, 6 or 7.")
}
'5': {
$service_dependencies = ['messagebus']
$extra_packages = [
'authconfig',
]
$extra_packages_ensure = 'latest'
$manage_oddjobd = false
}
'6': {
$service_dependencies = ['messagebus']
$extra_packages = [
'authconfig',
'oddjob-mkhomedir',
]
$extra_packages_ensure = 'present'
$manage_oddjobd = true
}
'7': {
$service_dependencies = []
$extra_packages = [
'authconfig',
'oddjob-mkhomedir',
]
$extra_packages_ensure = 'present'
$manage_oddjobd = true
}
}
}
/^7/: {
$service_dependencies = []
$extra_packages = [
'authconfig',
'oddjob-mkhomedir',
]
$extra_packages_ensure = 'present'
$manage_oddjobd = true
'Fedora': {
case $::operatingsystemmajrelease {
default: {
fail("operatingsystemrelease is <${::operatingsystemrelease}> and must be in 25 or 26.")
}
'25', '26': {
$service_dependencies = []
$extra_packages = [
'authconfig',
'oddjob-mkhomedir',
]
$extra_packages_ensure = 'present'
$manage_oddjobd = true
}
}
}
}
}
Expand Down
32 changes: 25 additions & 7 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '5.7',
:rubyversion => '1.9.3'
:operatingsystemmajrelease => '5',
:rubyversion => '1.9.3',
}
end

Expand Down Expand Up @@ -40,8 +42,10 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '5.7',
:rubyversion => '1.8.7'
:operatingsystemmajrelease => '5',
:rubyversion => '1.8.7',
}
end
it do
Expand All @@ -62,8 +66,10 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '4.0',
:rubyversion => '1.9.3'
:operatingsystemmajrelease => '4',
:rubyversion => '1.9.3',
}
end

Expand All @@ -78,8 +84,10 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6.6',
:rubyversion => '1.9.3'
:operatingsystemmajrelease => '6',
:rubyversion => '1.9.3',
}
end

Expand Down Expand Up @@ -116,8 +124,10 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6.6',
:rubyversion => '1.8.7'
:operatingsystemmajrelease => '6',
:rubyversion => '1.8.7',
}
end
it do
Expand All @@ -137,8 +147,10 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7.1',
:rubyversion => '1.9.3'
:operatingsystemmajrelease => '7',
:rubyversion => '1.9.3',
}
end

Expand Down Expand Up @@ -175,7 +187,9 @@
let(:facts) do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7.1',
:operatingsystemmajrelease => '7',
:rubyversion => '1.8.7'
}
end
Expand All @@ -196,8 +210,10 @@
let(:facts) do
{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '8.1',
:rubyversion => '1.9.3'
:operatingsystemmajrelease => '8',
:rubyversion => '1.9.3',
}
end

Expand Down Expand Up @@ -232,7 +248,9 @@
let(:facts) do
{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '8.1',
:operatingsystemmajrelease => '8',
:rubyversion => '1.8.7'
}
end
Expand Down