Loading manifests/params.pp +3 −3 Original line number Diff line number Diff line Loading @@ -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', } Loading metadata.json +2 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7" "7", "8" ] }, { Loading spec/classes/postfix_spec.rb +9 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading
manifests/params.pp +3 −3 Original line number Diff line number Diff line Loading @@ -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', } Loading
metadata.json +2 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7" "7", "8" ] }, { Loading
spec/classes/postfix_spec.rb +9 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading