Cookbooks
selinux
documentation
Selinux Install

Back to resource list

selinux_install

The selinux_install resource is used to encapsulate the set of selinux packages to install in order to manage selinux. It also ensures the directory /etc/selinux is created.

Introduced: v4.0.0

Actions

ActionDescription
:install(Default) Install required packages
:upgradeUpgrade required packages
:removeRemove any SELinux-related packages

Properties

NameTypeDefaultDescription
packagesString, Arraysee default_install_packagesSELinux packages for system

Examples

Default installation

selinux_install 'example'

Install with custom packages

selinux_install 'example' do
  packages %w(policycoreutils selinux-policy selinux-policy-targeted)
end

Uninstall

selinux_install 'example' do
  action :remove
end