Commit 44b4a00b authored by zeromind's avatar zeromind Committed by Raphaël Pinson

Add RedHat 8 support (#257)

parent 6e6c6c96
......@@ -4,18 +4,18 @@ class postfix::params {
$aliasesseltype = $::operatingsystemmajrelease ? {
'4' => 'etc_t',
/5/ => 'postfix_etc_t',
/6|7/ => 'etc_aliases_t',
/6|7|8/ => 'etc_aliases_t',
default => undef,
}
$seltype = $::operatingsystemmajrelease ? {
'4' => 'etc_t',
/5|6|7/ => 'postfix_etc_t',
/5|6|7|8/ => 'postfix_etc_t',
default => undef,
}
$restart_cmd = $::operatingsystemmajrelease ? {
'7' => '/bin/systemctl reload postfix',
/7|8/ => '/bin/systemctl reload postfix',
default => '/etc/init.d/postfix reload',
}
......
......@@ -50,7 +50,8 @@
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"6",
"7"
"7",
"8"
]
},
{
......
......@@ -45,6 +45,15 @@ describe 'postfix' do
it { is_expected.to contain_postfix__config('mailq_path') }
case facts[:operatingsystemmajrelease]
when '8'
it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") }
it {
is_expected.to contain_service('postfix').with(
:ensure => 'running',
:enable => 'true',
:hasstatus => 'true',
:restart => '/bin/systemctl reload postfix'
) }
when '7'
it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") }
it {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment