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

Add RedHat 8 support (#257)

parent 6e6c6c96
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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',
      }

+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@
      "operatingsystem": "RedHat",
      "operatingsystemrelease": [
        "6",
        "7"
        "7",
        "8"
      ]
    },
    {
+9 −0
Original line number Diff line number Diff line
@@ -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 {