-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for templated SE Linux agent module #452
Conversation
manifests/agent.pp
Outdated
@@ -415,7 +417,7 @@ | |||
if $facts['selinux'] == true and $manage_selinux { | |||
selinux::module{'zabbix-agent': | |||
ensure => 'present', | |||
source_te => 'puppet:///modules/zabbix/zabbix-agent.te', | |||
content_te => template('zabbix/selinux/zabbix-agent.te.erb'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you switch this to an epp template instead of erb?
Hi @tux-o-matic, thanks for this PR!
|
|
||
### SE Linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a newline after the heading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can recommend https://dlaa.me/markdownlint/ as a linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README is full of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep. github changed their parser in the past, so now we try to enforce their rules for new changes.
README.md
Outdated
On systems with SE Linux active and enforcing, Zabbix agent will be limited unless given proper rights with an SE Linux module. | ||
This Puppet module will apply some default SE Linux rules for it. | ||
More can be provided if needed by using two class parameters, for example in Hiera YAML: | ||
```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a newline before the codeblock
There was a failed job in Travis CI due to some internal container or network issue with Travis. |
acceptance tests on centos7 fail. unable to fetch the zabbix-server package. I will take a look later |
Consider adding a parameter for the selinux rules template path, defaulting to selinux/zabbix-agent.te.erb as well. |
@juniorsysadmin the agent rules are now a template and the default vales (in params.pp) are the same as the old static files. |
source_te => 'puppet:///modules/zabbix/zabbix-agent.te', | ||
before => Service['zabbix-agent'], | ||
ensure => 'present', | ||
content_te => template('zabbix/selinux/zabbix-agent.te.erb'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tux-o-matic What I meant is that zabbix/selinux/zabbix-agent.te.erb should also be the default value of a new parameter named say $selinux_content_te , so if a user doesn't want to use the selinux template included with this module, they can use their own as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template is an empty shell, everything is doable via the new class parameters. This PR only adds flexibility.
@tux-o-matic can you please rebase against our latest master? |
@bastelfreak rebased and green CI. |
It looks like you didn't rebase, but merged master into this branch, but that is okay as well. |
Fix #441
The current static files used as source for the SE Linux module is too narrow.
With this PR, custom types, classes and rules can be defined for custom SE Linux rules.
For example: