class Chef::Resource::SelinuxInstall
Public Instance Methods
do_package_action(action)
click to toggle source
# File lib/chef/resource/selinux_install.rb, line 53 def do_package_action(action) # friendly message for unsupported platforms raise "The platform #{node["platform"]} is not currently supported by the `selinux_install` resource. Please file an issue at https://github.com/chef/chef/issues with details on the platform this cookbook is running on." if new_resource.packages.nil? package "selinux" do package_name new_resource.packages action action end end
Private Instance Methods
default_install_packages()
click to toggle source
Get an array of packages to be installed based upon node platform_family
@return [Array] Array of string of package names
# File lib/chef/resource/selinux_install.rb, line 89 def default_install_packages case node["platform_family"] when "rhel", "fedora", "amazon" %w{make policycoreutils selinux-policy selinux-policy-targeted selinux-policy-devel libselinux-utils setools-console} when "debian" if node["platform"] == "ubuntu" if node["platform_version"].to_f == 18.04 %w{make policycoreutils selinux selinux-basics selinux-policy-default selinux-policy-dev auditd setools} else %w{make policycoreutils selinux-basics selinux-policy-default selinux-policy-dev auditd setools} end else %w{make policycoreutils selinux-basics selinux-policy-default selinux-policy-dev auditd setools} end end end