diff --git a/CHANGELOG.md b/CHANGELOG.md index 434fe2b..7e57815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.2.5 + +* Added auditd's log directory under puppet management + ## 0.2.4 * Added support for RHEL 8 diff --git a/manifests/init.pp b/manifests/init.pp index 43f32af..4bbb6f3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -30,12 +30,22 @@ $flush = $audit::params::flush_default, $manage_auditconf = true, $auditd_specifics = true, + $log_dir = '/var/log/audit', ) inherits audit::params { package { $audit::params::pkg_audit: ensure => 'installed', } + file { $log_dir: + ensure => 'present', + owner => 'root', + group => 'root', + mode => '0750', + require => Package[$audit::params::pkg_audit], + before => File['/etc/audit/auditd.conf'] + } + if($manage_auditconf) { file { '/etc/audit/auditd.conf': diff --git a/metadata.json b/metadata.json index c640ea9..8e8bfb4 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "eyp-audit", - "version": "0.2.4", + "version": "0.2.5", "author": "eyp", "summary": "auditd management", "license": "Apache-2.0", diff --git a/templates/auditdconf.erb b/templates/auditdconf.erb index 1c644f4..1ecdf32 100644 --- a/templates/auditdconf.erb +++ b/templates/auditdconf.erb @@ -4,7 +4,7 @@ # This file controls the configuration of the audit daemon # -log_file = /var/log/audit/audit.log +log_file = <%= @log_dir %>/audit.log log_group = root log_format = <%= @log_format %> flush = <%= @flush %>