Puppet Class: selinux
- Inherited by:
-
selinux::refpolicy_package
- Defined in:
- manifests/init.pp
Overview
Manage SELinux on RHEL based systems.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'manifests/init.pp', line 33
class selinux (
Variant[String[1], Array[String[1]]] $package_name,
Boolean $manage_auditd_package,
String $refpolicy_package_name,
Boolean $manage_setroubleshoot_packages,
Array[String] $setroubleshoot_package_names = [],
Optional[Enum['enforcing', 'permissive', 'disabled']] $mode = undef,
Optional[Enum['targeted', 'minimum', 'mls']] $type = undef,
Stdlib::Absolutepath $refpolicy_makefile = '/usr/share/selinux/devel/Makefile',
Boolean $manage_package = true,
String[1] $auditd_package_name = 'auditd',
Stdlib::Absolutepath $module_build_root = "${facts['puppet_vardir']}/puppet-selinux",
Enum['refpolicy', 'simple'] $default_builder = 'simple',
Optional[Hash] $boolean = undef,
Optional[Hash] $fcontext = undef,
Optional[Hash] $module = undef,
Optional[Hash] $permissive = undef,
Optional[Hash] $port = undef,
Optional[Hash] $exec_restorecon = undef,
) {
class { 'selinux::package':
manage_package => $manage_package,
package_names => Array.new($package_name, true),
manage_auditd_package => $manage_auditd_package,
auditd_package_name => $auditd_package_name,
manage_setroubleshoot_packages => $manage_setroubleshoot_packages,
setroubleshoot_package_names => $setroubleshoot_package_names,
}
class { 'selinux::config':
mode => $mode,
type => $type,
}
if $boolean {
create_resources ( 'selinux::boolean', $boolean )
}
if $fcontext {
create_resources ( 'selinux::fcontext', $fcontext )
}
if $module {
create_resources ( 'selinux::module', $module )
}
if $permissive {
create_resources ( 'selinux::permissive', $permissive )
}
if $port {
create_resources ( 'selinux::port', $port )
}
if $exec_restorecon {
create_resources ( 'selinux::exec_restorecon', $exec_restorecon )
}
# Ordering
anchor { 'selinux::start': }
-> Class['selinux::package']
-> Class['selinux::config']
-> anchor { 'selinux::module pre': }
-> anchor { 'selinux::module post': }
-> anchor { 'selinux::end': }
}
|