diff --git a/data/os/RedHat/CentOS/5.yaml b/data/os/RedHat/CentOS/5.yaml deleted file mode 100644 index b8b6027c..00000000 --- a/data/os/RedHat/CentOS/5.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils diff --git a/data/os/RedHat/CentOS/6.yaml b/data/os/RedHat/CentOS/6.yaml deleted file mode 100644 index f20d7431..00000000 --- a/data/os/RedHat/CentOS/6.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils-python diff --git a/data/os/RedHat/OracleLinux/5.yaml b/data/os/RedHat/OracleLinux/5.yaml deleted file mode 100644 index b8b6027c..00000000 --- a/data/os/RedHat/OracleLinux/5.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils diff --git a/data/os/RedHat/OracleLinux/6.yaml b/data/os/RedHat/OracleLinux/6.yaml deleted file mode 100644 index f20d7431..00000000 --- a/data/os/RedHat/OracleLinux/6.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils-python diff --git a/data/os/RedHat/RedHat/5.yaml b/data/os/RedHat/RedHat/5.yaml deleted file mode 100644 index b8b6027c..00000000 --- a/data/os/RedHat/RedHat/5.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils diff --git a/data/os/RedHat/RedHat/6.yaml b/data/os/RedHat/RedHat/6.yaml deleted file mode 100644 index f20d7431..00000000 --- a/data/os/RedHat/RedHat/6.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils-python diff --git a/data/os/RedHat/Scientific/5.yaml b/data/os/RedHat/Scientific/5.yaml deleted file mode 100644 index b8b6027c..00000000 --- a/data/os/RedHat/Scientific/5.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils diff --git a/data/os/RedHat/Scientific/6.yaml b/data/os/RedHat/Scientific/6.yaml deleted file mode 100644 index f20d7431..00000000 --- a/data/os/RedHat/Scientific/6.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -selinux::package_name: policycoreutils-python diff --git a/lib/puppet/provider/selinux_fcontext/semanage.rb b/lib/puppet/provider/selinux_fcontext/semanage.rb index 74602f30..36f7cb82 100644 --- a/lib/puppet/provider/selinux_fcontext/semanage.rb +++ b/lib/puppet/provider/selinux_fcontext/semanage.rb @@ -9,13 +9,7 @@ mk_resource_methods - osfamily = Facter.value('osfamily') - osversion = Facter.value('operatingsystemmajrelease') - operatingsystem = Facter.value('operatingsystem') @old_semanage = false - if (osfamily == 'RedHat') && (Puppet::Util::Package.versioncmp(osversion, '6') <= 0) && (operatingsystem != 'Amazon') - @old_semanage = true - end @file_types = { 'all files' => 'a', diff --git a/metadata.json b/metadata.json index 4d294325..e9bd8d63 100644 --- a/metadata.json +++ b/metadata.json @@ -11,7 +11,6 @@ { "operatingsystem": "RedHat", "operatingsystemrelease": [ - "6", "7", "8" ] @@ -19,7 +18,6 @@ { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "6", "7", "8" ] diff --git a/spec/classes/selinux_package_spec.rb b/spec/classes/selinux_package_spec.rb index 746b4fbd..f0c5d7ed 100644 --- a/spec/classes/selinux_package_spec.rb +++ b/spec/classes/selinux_package_spec.rb @@ -2,7 +2,7 @@ describe 'selinux' do context 'package' do - %w[6 7].each do |majrelease| + %w[7].each do |majrelease| context "On RedHat #{majrelease} based OSes" do let(:facts) do { @@ -14,6 +14,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('policycoreutils-python').with(ensure: 'installed') } it { is_expected.not_to contain_package('auditd') } end @@ -30,6 +31,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('policycoreutils-python-utils').with(ensure: 'installed') } end @@ -45,6 +47,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('policycoreutils-python-utils').with(ensure: 'installed') } end end @@ -60,6 +63,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('policycoreutils').with(ensure: 'installed') } end @@ -74,6 +78,8 @@ } end + it { is_expected.to compile.with_all_deps } + %w[policycoreutils-python-utils selinux-basics selinux-policy-default auditd].each do |package| it { is_expected.to contain_package(package).with(ensure: 'installed') } end @@ -94,6 +100,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.not_to contain_package('policycoreutils-python').with(ensure: 'installed') } end @@ -112,6 +119,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('some_package').with(ensure: 'installed') } end @@ -130,6 +138,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('setroubleshoot').with(ensure: 'installed') } it { is_expected.to contain_package('setroubleshoot-plugins').with(ensure: 'installed') } end @@ -149,6 +158,7 @@ } end + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('policycoreutils-sandbox').with(ensure: 'installed') } it { is_expected.to contain_package('selinux-policy-sandbox').with(ensure: 'installed') } end