Skip to content

Commit

Permalink
System: Add logrotate variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Oct 19, 2021
1 parent a9fad5a commit 45d4d71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions roles/system/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ timezone_use_local_rtc: false

system_locale: "en_US.UTF-8"
system_language: "en_US.UTF-8"

traefik_max_log_size: 10M
saltbox_max_log_size: 2M
4 changes: 2 additions & 2 deletions roles/system/tasks/subtasks/logrotate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/srv/git/saltbox/saltbox.log {
weekly
rotate 0
size 2M
size {{ saltbox_max_log_size }}
missingok
notifempty
create 644 {{ user.name }} {{ user.name }}
Expand All @@ -40,7 +40,7 @@
content: |
/opt/traefik/*.log {
rotate 5
size 10M
size {{ traefik_max_log_size }}
missingok
notifempty
postrotate
Expand Down

0 comments on commit 45d4d71

Please sign in to comment.