Skip to content

Commit

Permalink
afegit logrotate
Browse files Browse the repository at this point in the history
  • Loading branch information
jordiprats committed Oct 18, 2016
1 parent 2e8a985 commit 82f785f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# CHANGELOG

## 0.1.6

* logrotate configuration file using eyp-logrotate (manage_logrotate=>false to disable)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class { 'audit::tty': }

* **buffers**: buffers to survive stress events (default: 320)
* **add_default_rules**: add the following default rules - it will apply b64 only if is applicable, same for /etc/sysconfig/network (default: true)
* **manage_logrotate**: add logrotate config file (default: true)
* **logrotate_rotate** = '4',
* **logrotate_compress** = true,
* **logrotate_missingok** = true,
* **logrotate_notifempty** = true,

```
-w /var/tmp -p x
-w /tmp -p x
Expand Down
22 changes: 18 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# == Class: audit
#
class audit (
$buffers='320',
$add_default_rules=true,
$buffers = '320',
$add_default_rules = true,
$manage_logrotate = true,
$logrotate_rotate = '4',
$logrotate_compress = true,
$logrotate_missingok = true,
$logrotate_notifempty = true,
) inherits audit::params {

package { $audit::params::pkg_audit:
Expand Down Expand Up @@ -41,6 +46,15 @@
}
}



if($manage_logrotate)
{
logrotate::logs { 'audit':
ensure => present,
log => [ '/var/log/audit/audit.log' ],
rotate => '4',
compress => true,
missingok => true,
notifempty => true,
}
}
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-audit",
"version": "0.1.5",
"version": "0.1.6",
"author": "eyp",
"summary": "basic auditd support",
"license": "Apache-2.0",
Expand Down

0 comments on commit 82f785f

Please sign in to comment.