chef/cookbooks/selinux/libraries/selinux_service_helpers.rb
2016-02-19 18:09:49 +01:00

14 lines
288 B
Ruby

module SELinuxServiceHelpers
def self.selinux_bool(bool)
if ['on', 'true', '1', true, 1].include? bool
'on'
elsif ['off', 'false', '0', false, 0].include? bool
'off'
else
Chef::Log.warn "Not a valid boolean value: #{bool}"
nil
end
end
end