Documentation by YARD 0.9.9
+Alphabetic Index
+ +Puppet Class Listing A-Z
+ + +
+
+
+
|
+
File Listing
+-
+
+
+
- README + + +
From c7e77e4c88c5b5a35136d9a3025b0bb2f945fe99 Mon Sep 17 00:00:00 2001
From: Jenkins Server
+Changelog of Git Changelog.
+
+ Git Changelog changelog
+
+ Unreleased
+ No issue
+
+
+d6485074480abf9 Arne Teuke 2017-07-20 11:49:07
+added main directory control
+
+
+
+
+
|
+
| t |
+ + + +23 +24 +25+ |
+
+ # File 'manifests/init.pp', line 23
+
+class cd_selinux {
+ include cd_selinux::params
+}
+ |
+
cd_selinux::dirs.pp +Module name: cd_selinux +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_selinux.
+ +cd_selinux is used for providing automatic configuration of SELINUX + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.
+ +This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.
+ +You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40+ |
+
+ # File 'manifests/main/dirs.pp', line 23
+
+class cd_selinux::dirs (
+
+) inherits cd_selinux::params {
+
+ require cd_selinux::main::install
+
+ file { $sx_main_dir:
+ ensure => directory,
+ path => $sx_main_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => selinux_config_t,
+ seluser => system_u,
+ }
+}
+ |
+
cd_selinux::main::config.pp +Module name: cd_selinux +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_selinux.
+ +cd_selinux is used for providing automatic configuration of SELINUX. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.
+ +This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.
+ +You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.
+ +
+ + + +24 +25 +26 +27 +28 +29 +30+ |
+
+ # File 'manifests/main/config.pp', line 24
+
+class cd_selinux::main::config (
+
+) inherits cd_selinux::params {
+
+ include cd_selinux::main::files
+
+}
+ |
+
cd_selinux::main::files.pp +Module name: cd_selinux +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_selinux.
+ +cd_selinux is used for providing automatic configuration of SELINUX + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.
+ +This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.
+ +You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41+ |
+
+ # File 'manifests/main/files.pp', line 23
+
+class cd_selinux::main::files (
+
+) inherits cd_selinux::params {
+
+ require cd_selinux::main::dirs
+
+ file { $sx_main_file:
+ ensure => file,
+ path => $sx_main_file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => selinux_config_t,
+ seluser => system_u,
+ content => template($sx_main_file_erb),
+ }
+}
+ |
+
cd_selinux::main::install.pp +Module name: cd_selinux +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_selinux.
+ +cd_selinux is used for providing automatic configuration of SELINUX + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.
+ +This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.
+ +You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.
+ +
+ + + +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39+ |
+
+ # File 'manifests/main/install.pp', line 24
+
+class cd_selinux::main::install (
+
+) inherits cd_selinux::params {
+
+ require cd_selinux::main::yumrepo
+
+ package {$reqpackages_main:
+ ensure => $pkg_ensure,
+ }
+
+ if $sx_install_setools == true {
+ package {$reqpackages_tools:
+ ensure => $pkg_ensure,
+ }
+ }
+}
+ |
+
cd_selinux::params.pp +Module name: cd_selinux +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_selinux.
+ +cd_selinux is used for providing automatic configuration of SELINUX. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.
+ +This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.
+ +You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.
+ +
+ + + +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+ |
+
+ # File 'manifests/params.pp', line 34
+
+class cd_selinux::params (
+
+$pkg_ensure = 'latest',
+
+$sx_install_setools = false,
+$sx_selinux_status = 'enforcing',
+$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
+}
+ |
+
+
+
cd_selinux::main::dirs.pp +Module name: cd_selinux +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_selinux.
+ +cd_selinux is used for providing automatic configuration of SELINUX + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.
+ +This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.
+ +You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40+ |
+
+ # File 'manifests/main/dirs.pp', line 23
+
+class cd_selinux::main::dirs (
+
+) inherits cd_selinux::params {
+
+ require cd_selinux::main::install
+
+ file { $sx_main_dir:
+ ensure => directory,
+ path => $sx_main_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => selinux_config_t,
+ seluser => system_u,
+ }
+}
+ |
+
+
+
All dependencies must be included in the catalogue.
+cd_resources +for yum repo resources.
+All dependencies must be included in the catalogue.
+cd_resources +for yum repo resources.
++
-
+
+
+
diff --git a/doc/_index.html b/doc/_index.html index 783b653..24bc57e 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -127,7 +127,7 @@
diff --git a/doc/file.README.html b/doc/file.README.html index c1eb430..1c634c1 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -61,7 +61,7 @@|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_selinux| 0.0.0.3 | cd_selinux| 0.0.1.0 | {Build
Status/]|
Installation: * install binaries required for selinux and related tools
+Configuration +* manage /etc/sysconfig/selinux file (file system +permissions, selinux context, content) +* manage current selinux status +(permissive,enforcing)
+Repostructure has moved to REPOSTRUCTURE.md in repo.
@@ -173,6 +179,11 @@ at next puppet run. Services will be restarted where neccessary.sx_install_setools : Whether to install additional selinux
tools, i.e. for troubleshooting.
sx_selinux_status : Which selinux status should be configured,
+sets both the status in the configuration file and on commanbd line. Valid
+options are enforcing and permissive. Defaults to
+enforcing.
Systems configured with selinux disabled require a reboot for selinux to be +enabled. This module will not do the reboot for you to +avoid unexpected outages.
+|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_selinux| 0.0.0.3 | cd_selinux| 0.0.1.0 | {Build
Status/]|
Installation: * install binaries required for selinux and related tools
+Configuration +* manage /etc/sysconfig/selinux file (file system +permissions, selinux context, content) +* manage current selinux status +(permissive,enforcing)
+Repostructure has moved to REPOSTRUCTURE.md in repo.
@@ -173,6 +179,11 @@ at next puppet run. Services will be restarted where neccessary.sx_install_setools : Whether to install additional selinux
tools, i.e. for troubleshooting.
sx_selinux_status : Which selinux status should be configured,
+sets both the status in the configuration file and on commanbd line. Valid
+options are enforcing and permissive. Defaults to
+enforcing.
Systems configured with selinux disabled require a reboot for selinux to be +enabled. This module will not do the reboot for you to +avoid unexpected outages.
+# File 'manifests/main/config.pp', line 24
@@ -147,6 +155,14 @@ class cd_selinux::main::config (
include cd_selinux::main::files
+ if $sx_selinux_status == 'enforcing' {
+ exec { 'set_selinux_status':
+ command => 'setenforce 1',
+ path => ['/usr/sbin','/usr/bin'],
+ provider => shell,
+ unless => 'getenforce | grep -i "enforcing"'
+ }
+ }
}
The desired selinux status. Valid values
-are enforcing,
-`permissive, disabled. Note that changing from
-disabled
-to any othe other types requires a manual reboot to relable the
-file system.
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-lable the file system.
+This module does not do that for you to avoid
+unexpected outages.
-34 -35 -36 -37 38 39 40 @@ -256,10 +260,14 @@ file system. 61 62 63 -64+64 +65 +66 +67 +68
# File 'manifests/params.pp', line 34 +# File 'manifests/params.pp', line 38 class cd_selinux::params ( @@ -299,7 +307,7 @@ $sx_main_file_erb = 'cd_selinux/main/selinux_config.erb' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 6b10d87..2e2c256 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@