forked from sous-chefs/selinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Library cookbook refactor (sous-chefs#74)
* Library refactoring 1. Restore support for Debian based distros. 2. Correct chef workstation package name in Travis config. 3. Linting fixes. 4. Add CentOS 8 testing. 5. Add Debian 10 testing. 6. Set all resources unified_mode 7. Create selinux_boolean resource 8. Remove attributes and recipes 9. Refactor install resource 10. Refactor selinux_state resource 11. Add description to resource properties * Split kitchen tests into state groups * Refactor module resource and libraries Refactor libraries and resource to remove complexity due to SELinux CIL which removes module version numbers and thus the need to check them. * Add content support to module resource * Don't attempt to set illegal selinux states * Add some basic recipes * Add platforms to new testing config * Add automatic restart function to state resource * Set correct policy on Debian platforms * Increase kitchen reboot wait time and set root_path for Debian * Skip boolean action if disabled * Debian requires a module loading to allow module loading Yes, you read that correctly ;) * Add additional modules actions and add filepath helper method * Ubuntu kitchen required selinux modules and disable 18.04 enforcing CI
- Loading branch information
Showing
60 changed files
with
1,036 additions
and
766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[Back to resource list](../README.md#resources) | ||
|
||
# selinux_boolean | ||
|
||
Set SELinux boolean values. | ||
|
||
Introduced: v4.0.0 | ||
|
||
## Actions | ||
|
||
- `:set` | ||
|
||
## Properties | ||
|
||
| Name | Type | Default | Description | Allowed Values | | ||
| ------------ | ---------------------------- | ------- | ----------------------------------------------- | -------------- | | ||
| `boolean` | String | | SELinux boolean to set | | | ||
| `value` | Integer, String, true, false | | SELinux boolean value | `on`, `off` | | ||
| `persistent` | true, false | true | Set to true for value setting to survive reboot | | | ||
|
||
## Examples | ||
|
||
```ruby | ||
selinux_boolean 'ssh_keysign' do | ||
value true | ||
end | ||
|
||
``` | ||
|
||
```ruby | ||
selinux_boolean 'staff_exec_content' do | ||
value false | ||
end | ||
``` | ||
|
||
```ruby | ||
selinux_boolean 'ssh_sysadm_login' do | ||
value 'on' | ||
end | ||
``` | ||
|
||
```ruby | ||
selinux_boolean 'squid_connect_any' do | ||
value 'off' | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[Back to resource list](../README.md#resources) | ||
|
||
# selinux_install | ||
|
||
The `selinux_install` resource is used to encapsulate the set of selinux packages to install in order to manage selinux. It also ensures the directory `/etc/selinux` is created. | ||
|
||
Introduced: v4.0.0 | ||
|
||
## Actions | ||
|
||
- `:install` | ||
- `:upgrade` | ||
- `:remove` | ||
|
||
## Properties | ||
|
||
| Name | Type | Default | Description | | ||
| ---------- | ------------- | -------------------------- | --------------------------- | | ||
| `packages` | String, Array | `default_install_packages` | SELinux packages for system | | ||
|
||
## Examples | ||
|
||
### Default installation | ||
|
||
```ruby | ||
selinux_install '' do | ||
action :install | ||
end | ||
``` | ||
|
||
### Install with excluded packages | ||
|
||
```ruby | ||
selinux_install '' do | ||
packages_exclude %w(policycoreutils selinux-policy selinux-policy-targeted ) | ||
action :install | ||
end | ||
``` | ||
|
||
### Uninstall | ||
|
||
```ruby | ||
selinux_install '' do | ||
action :remove | ||
end | ||
``` |
Oops, something went wrong.