Skip to content

Commit

Permalink
Merge pull request #2428 from puppetlabs/maint-addressing_selinux_facts
Browse files Browse the repository at this point in the history
(Maint) Addressing Selinux legacy facts
  • Loading branch information
jordanbreen28 committed Jun 22, 2023
2 parents 8656238 + 803fe1d commit 1f0f3e1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/acceptance/apache_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class { 'apache':
describe 'logging' do
describe 'setup' do
pp = <<-MANIFEST
if $facts['osfamily'] == 'RedHat' and $facts['selinux'] {
if $facts['os']['family'] == 'RedHat' and $facts['os']['selinux']['enabled'] {
exec { 'set_apache_defaults':
command => 'semanage fcontext -a -t httpd_log_t "/apache_spec/logs(/.*)?"',
unless => 'semanage fcontext --list | grep /apache_spec/logs | grep httpd_log_t',
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
context 'custom site/mod dir parameters' do
let(:pp) do
<<-MANIFEST
if $facts['osfamily'] == 'RedHat' and $facts['selinux'] {
if $facts['os']['family'] == 'RedHat' and $facts['os']['selinux']['enabled'] {
exec { 'set_apache_defaults':
command => 'semanage fcontext --add -t httpd_config_t "/apache_spec/apache_custom(/.*)?"',
unless => 'semanage fcontext --list | grep /apache_spec/apache_custom | grep httpd_config_t',
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ class { 'apache::mod::wsgi': }

describe 'additional_includes' do
pp = <<-MANIFEST
if $facts['osfamily'] == 'RedHat' and $facts['selinux'] {
if $facts['os']['family'] == 'RedHat' and $facts['os']['selinux']['enabled'] {
exec { 'set_apache_defaults':
command => 'semanage fcontext --add -t httpd_sys_content_t "/apache_spec/docroot(/.*)?"',
unless => 'semanage fcontext --list | grep /apache_spec/docroot | grep httpd_sys_content_t',
Expand Down
2 changes: 1 addition & 1 deletion spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
}

if $facts['selinux'] {
if $facts['os']['selinux']['enabled'] {
$semanage_package = $facts['os']['release']['major'] ? {
'6' => 'policycoreutils-python',
'7' => 'policycoreutils-python',
Expand Down

0 comments on commit 1f0f3e1

Please sign in to comment.