## cd_selinux::params.pp # Module name: cd_selinux # Author: Arne Teuke (arne_teuke@ConfDroid.com) # @summary Class holds all parameters for the cd_selinux module and is # inherited by all classes except defines. # @param [String] pkg_ensure # which [package type](https://confdroid.com/2017/05/puppet-type-package/) # to choose, i.e. `latest` or `present`. # @param [Boolean] sx_install_setools Whether to install additional selinux # tools, i.e. for troubleshooting. # @param [String] sx_selinux_status The desired selinux status. Used for both # managing the configuration file as well as the command line (setenforce). # Valid values are `enforcing` and `permissive`. While the configuration file # supports another option 'disabled', this option is not available on # commandline. Note that changing the active selinux status from `disabled` # to any the other types requires a manual reboot to re-label the file system. # This module does not do that for you to avoid unexpected outages. # @param [String] sx_selinux_type The desired selinux type. Valid options are # `targeted`, `minimum` and `mls`. ############################################################################## class cd_selinux::params ( String $pkg_ensure = 'latest', Boolean $sx_install_setools = false, String $sx_selinux_status = 'enforcing', String $sx_selinux_type = 'targeted', ) { # installation section $reqpackages_main = $::operatingsystem ? { /(?i-mx:centos|fedora|redhat)/ => ['selinux-policy','policycoreutils'], } $reqpackages_tools = $::operatingsystem ? { /(?i-mx:centos|fedora|redhat)/ => ['setroubleshoot-server','policycoreutils-python'], } # directories $sx_main_dir = '/etc/selinux' # files $sx_main_file = "${sx_main_dir}/config" $sx_main_file_erb = 'cd_selinux/main/selinux_config.erb' # includes must be last include cd_selinux::main::config }