Puppet Class: selinux
- Inherited by:
-
selinux::refpolicy_package
- Defined in:
- manifests/init.pp
Overview
Manage SELinux on RHEL based systems.
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'manifests/init.pp', line 37
class selinux (
Variant[String[1], Array[String[1]]] $package_name,
Boolean $manage_auditd_package,
String $refpolicy_package_name,
Boolean $manage_setroubleshoot_packages,
Boolean $manage_selinux_sandbox_packages,
Array[String] $setroubleshoot_package_names = [],
Array[String] $selinux_sandbox_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] $fcontext_equivalence = undef,
Optional[Hash] $module = undef,
Optional[Hash] $permissive = undef,
Optional[Hash] $port = undef,
Optional[Hash] $exec_restorecon = undef,
Hash[String[1],Hash[String[1],String[1]]] $login = {},
) {
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,
manage_selinux_sandbox_packages => $manage_selinux_sandbox_packages,
selinux_sandbox_package_names => $selinux_sandbox_package_names,
}
class { 'selinux::config':
mode => $mode,
type => $type,
}
if $boolean {
create_resources ( 'selinux::boolean', $boolean )
}
if $fcontext {
create_resources ( 'selinux::fcontext', $fcontext )
}
if $fcontext_equivalence {
create_resources ( 'selinux::fcontext::equivalence', $fcontext_equivalence )
}
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 )
}
$login.each |$login_name, $login_attributes| {
selinux::login { $login_name:
* => $login_attributes,
}
}
# Ordering
anchor { 'selinux::start': }
-> Class['selinux::package']
-> Class['selinux::config']
-> anchor { 'selinux::module pre': }
-> anchor { 'selinux::module post': }
-> anchor { 'selinux::end': }
}
|