Use service to restart auditd #19
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
name: Pull request
about: Resolve issue #18
Describe the change
Rewrite of handler
restart auditdto use the/usr/sbin/servicecommand instead of theansible.builtin.servicemodule. This ensuresauditdis restarted properly, for example in the event of a configuration change.See issue #18 for more in depth information.
Testing
First I tested this for my situation. This fixes my issue. Per my playbook in issue #18 : I want to set the
log_groupto groupsplunkand a restart ofauditdshould modify the group ownership of theaudit.logfile.This role specifies compatibility with:
I verified the location of the
/usr/sbin/servicescript in, the most recent, version of each of them:RHEL 8
Debian
Fedora
The only one whoes container image does not supply
servicein the box. It is supplied by packageinitscripts-serviceand that of course is a dependency of packageaudit.OpenSUSE
Ubuntu
Not exhaustive for all versions, but at least it is compatible with current versions. And seeing how Debian & Ubuntu, and Fedora & RHEL are related I am fairly confident this will work for multiple versions of each.