Compare commits
9 Commits
233c6d6b45
...
1.0.0-4.20
| Author | SHA1 | Date | |
|---|---|---|---|
| 054a912251 | |||
| b766962f39 | |||
| dc4f967292 | |||
| b949a0a661 | |||
| e307d7a02e | |||
| a5e4dc02ba | |||
| 1aae89edca | |||
| 5c2a2e215c | |||
| 34877c45c8 |
40
.gitignore
vendored
40
.gitignore
vendored
@@ -1,39 +1,5 @@
|
|||||||
.git/
|
|
||||||
.*.sw[op]
|
|
||||||
.metadata
|
|
||||||
.yardoc
|
.yardoc
|
||||||
.yardwarns
|
Gemfile.lock
|
||||||
|
FileList
|
||||||
.scannerwork
|
.scannerwork
|
||||||
*.iml
|
.vscode
|
||||||
/.bundle/
|
|
||||||
/.idea/
|
|
||||||
/.vagrant/
|
|
||||||
/coverage/
|
|
||||||
/bin/
|
|
||||||
/doc/
|
|
||||||
/Gemfile.local
|
|
||||||
/Gemfile.lock
|
|
||||||
/junit/
|
|
||||||
/log/
|
|
||||||
/pkg/
|
|
||||||
/spec/fixtures/manifests/
|
|
||||||
/spec/fixtures/modules/*
|
|
||||||
/tmp/
|
|
||||||
/vendor/
|
|
||||||
/.vendor/
|
|
||||||
/convert_report.txt
|
|
||||||
/update_report.txt
|
|
||||||
.DS_Store
|
|
||||||
.project
|
|
||||||
.envrc
|
|
||||||
/inventory.yaml
|
|
||||||
/spec/fixtures/litmus_inventory.yaml
|
|
||||||
.resource_types
|
|
||||||
.modules
|
|
||||||
.task_cache.json
|
|
||||||
.plan_cache.json
|
|
||||||
.rerun.json
|
|
||||||
bolt-debug.log
|
|
||||||
.vscode
|
|
||||||
.puppet-lint.rc
|
|
||||||
.rspec
|
|
||||||
3
.puppet-lint.rc
Normal file
3
.puppet-lint.rc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--no-variable_scope-check
|
||||||
|
--no-top_scope_facts
|
||||||
|
--no-140chars-check
|
||||||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -2,6 +2,7 @@
|
|||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"getenforce",
|
"getenforce",
|
||||||
"policycoreutils",
|
"policycoreutils",
|
||||||
|
"SELINUXTYPE",
|
||||||
"setenforce",
|
"setenforce",
|
||||||
"setools",
|
"setools",
|
||||||
"setroubleshoot",
|
"setroubleshoot",
|
||||||
|
|||||||
40
README.md
40
README.md
@@ -1,8 +1,7 @@
|
|||||||
# Readme
|
# Readme
|
||||||
|
|
||||||
[](https://jenkins.confdroid.com/job/confdroid_selinux/)
|
[](https://jenkins.confdroid.com/job/confdroid_selinux/)
|
||||||
|
[](https://sonarqube.confdroid.com/dashboard?id=confdroid_selinux)
|
||||||
[[_TOC_]]
|
|
||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
@@ -18,12 +17,12 @@
|
|||||||
|
|
||||||
Installation:
|
Installation:
|
||||||
|
|
||||||
* install binaries required for selinux and related tools
|
- install binaries required for selinux and related tools
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
|
|
||||||
* manage `/etc/sysconfig/selinux` file (file system permissions, selinux context, content)
|
- manage `/etc/sysconfig/selinux` file (file system permissions, selinux context, content)
|
||||||
* manage current selinux status (permissive,enforcing)
|
- manage current selinux status (permissive,enforcing)
|
||||||
|
|
||||||
## Repo Documentation
|
## Repo Documentation
|
||||||
|
|
||||||
@@ -33,11 +32,11 @@ See the full Puppet documentation including parameters in `docs/index.html`.
|
|||||||
|
|
||||||
All dependencies must be included in the catalogue.
|
All dependencies must be included in the catalogue.
|
||||||
|
|
||||||
* [cd_resources](https://gitlab.confdroid.com/puppet/cd_resources) for yum repo resources.
|
- [confdroid_resources](https://sourcecode.confdroid.com/confdroid/confdroid_resources) for yum repo resources.
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
* native Puppet deployment
|
- native Puppet deployment
|
||||||
|
|
||||||
via site.pp or nodes.pp
|
via site.pp or nodes.pp
|
||||||
|
|
||||||
@@ -47,9 +46,9 @@ node 'example.example.net' {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* through Foreman:
|
- through Foreman:
|
||||||
|
|
||||||
In order to apply parameters through Foreman, **__confdroid_selinux::params__** must be added to the host or host group in question.
|
In order to apply parameters through Foreman, **confdroid_selinux::params*- must be added to the host or host group in question.
|
||||||
|
|
||||||
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
|
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
|
||||||
|
|
||||||
@@ -59,25 +58,26 @@ All files and directories are configured with correct selinux context. If selinu
|
|||||||
|
|
||||||
## Known Problems
|
## Known Problems
|
||||||
|
|
||||||
* Systems reconfigured with selinux disabled require once a reboot for selinux to be enabled. This module will **__not__** do the reboot for you to avoid unexpected outages.
|
- Systems reconfigured with selinux disabled require once a reboot for selinux to be enabled. This module will **not**- do the reboot for you to avoid unexpected outages.
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
* OS: CentOS 7
|
- OS: Rocky 9 (any RHEL9-based OS should work, but Rocky has been tested)
|
||||||
* Puppet 5,6
|
- Puppet 8
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
* Puppet Lint
|
- Puppet Lint
|
||||||
* excluded tests:
|
- excluded tests:
|
||||||
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
|
- `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
|
||||||
* Puppet Parser
|
- Puppet Parser
|
||||||
* ERB Template Parser
|
- ERB Template Parser
|
||||||
* Sonar Quality Gate
|
- Sonar Quality Gate
|
||||||
|
|
||||||
## Contact Us
|
## Contact Us
|
||||||
|
|
||||||
[contact Us](https://confdroid.com/contact/)
|
- [contact Us](https://confdroid.com/contact/)
|
||||||
|
- [Feedback Portal](https://feedback.confdroid.com/)
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
class confdroid_selinux::params (
|
class confdroid_selinux::params (
|
||||||
|
|
||||||
Array[String] $sx_reqpackages = ['selinux-policy','policycoreutils','setroubleshoot-server','policycoreutils-python'],
|
Array[String] $sx_reqpackages = ['selinux-policy','policycoreutils','setroubleshoot-server','policycoreutils-python-utils'],
|
||||||
String $sx_pkg_ensure = 'latest',
|
String $sx_pkg_ensure = 'latest',
|
||||||
String $sx_selinux_status = 'enforcing',
|
String $sx_selinux_status = 'enforcing',
|
||||||
String $sx_selinux_type = 'targeted',
|
String $sx_selinux_type = 'targeted',
|
||||||
@@ -36,11 +36,11 @@ class confdroid_selinux::params (
|
|||||||
$os_release = $facts['os']['release']['major']
|
$os_release = $facts['os']['release']['major']
|
||||||
|
|
||||||
# directories
|
# directories
|
||||||
$sx_main_dir = '/etc/selinux'
|
$sx_main_dir = '/etc/selinux'
|
||||||
|
|
||||||
# files
|
# files
|
||||||
$sx_main_file = "${sx_main_dir}/config"
|
$sx_main_file = "${sx_main_dir}/config"
|
||||||
$sx_main_file_erb = 'confdroid_selinux/main/selinux_config.erb'
|
$sx_main_file_erb = 'confdroid_selinux/main/selinux_config.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include confdroid_selinux::main::config
|
include confdroid_selinux::main::config
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
########## /etc/selinux/config managed by Puppet ##########
|
########## /etc/selinux/config managed by Puppet ##########
|
||||||
########## manual changes will be overwritten !!! ##########
|
########## manual changes will be overwritten !!! ##########
|
||||||
|
########## original file: https://3for.me/wdtuj ##########
|
||||||
################################################################################
|
################################################################################
|
||||||
SELINUX=<%= @sx_selinux_status %>
|
SELINUX=<%= @sx_selinux_status %>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user