Make days retained configurable
This commit is contained in:
parent
47ad64d5e1
commit
579032189f
@ -11,7 +11,9 @@ Any pre-requisites that may not be covered by Ansible itself or the role should
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
| variable | default | purpose |
|
||||
| - | - | - |
|
||||
| log_retention_days | 90 | Number of days to retain logs on the system |
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
# defaults file for ensure_log_rotation
|
||||
log_retention_days: '90'
|
||||
|
@ -3,7 +3,7 @@
|
||||
daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 90
|
||||
rotate {{ log_retention_days }}
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
@ -3,7 +3,7 @@
|
||||
daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 90
|
||||
rotate {{ log_retention_days }}
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
@ -3,7 +3,7 @@
|
||||
daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 90
|
||||
rotate {{ log_retention_days }}
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
@ -3,7 +3,7 @@
|
||||
daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 90
|
||||
rotate {{ log_retention_days }}
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
@ -3,7 +3,7 @@
|
||||
daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 90
|
||||
rotate {{ log_retention_days }}
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
@ -3,7 +3,7 @@
|
||||
daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 90
|
||||
rotate {{ log_retention_days }}
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
Loading…
x
Reference in New Issue
Block a user