Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 63bd8a6

Browse files
author
Belmin Fernandez
committed
fix facter issues, link to bug, fixes spiette#27
1 parent efc97b6 commit 63bd8a6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# selinux_custom_policy.rb
1+
# As a workaround for Facter bug with EL7:
2+
# https://tickets.puppetlabs.com/browse/FACT-756
3+
#
4+
5+
require 'facter'
26

37
Facter.add(:selinux_custom_policy) do
48
confine :kernel => 'Linux', :osfamily => 'RedHat', :operatingsystemmajrelease => '7', :selinux => true
5-
6-
selinux_custom_policy = Facter::Core::Execution.exec('sestatus | grep "Loaded policy name" | awk \'{print $4}\'')
7-
89
setcode do
9-
selinux_custom_policy
10+
Facter::Util::Resolution.exec("sestatus | grep 'Loaded policy name' | awk '{ print $4 }'")
1011
end
1112
end

0 commit comments

Comments
 (0)