This role installs custom SELinux modules and set SELinux to Enforcing mode.
selinux_config_dir
: [default:/etc/selinux
]: Directory where will be store all SELinux module files from this role
selinux_custom_modules
: [default:{}
]: SELinux modules declarationsselinux_custom_modules.key
: [required]: The identifier of the module (e.g.first-custom-module:
)selinux_custom_modules.key.value
: [required]: Declarate the source code of custom SELinux modules
None
---
- host: localhost
roles:
- serverbee.selinux_custom_module
vars:
selinux_custom_modules:
first-custom-module: |
module first-custom-module 1.0;
require {
type myapp_t;
type myapp_port_t;
class tcp_socket name_bind;
}
allow myapp_t myapp_port_t:tcp_socket name_bind;
GPLv3 license
Bohdan Saienko