Add check to deploy config if log exists
Role will now test if a log exist (and hence the application exists on the host before writing a logrotate config to the server.
This commit is contained in:
parent
b0e5245e4e
commit
82d5bd7d16
5 changed files with 90 additions and 32 deletions
|
@ -36,14 +36,50 @@ logrotate_btmp:
|
|||
# An example of multiple log rotate applications with available settings:
|
||||
# logrotate_applications:
|
||||
# - name: name-your-log-rotate-application
|
||||
# definitions:
|
||||
# - logs:
|
||||
# - /var/log/apt/term.log
|
||||
# - /var/log/apt/history.log
|
||||
# options:
|
||||
# - rotate 12
|
||||
# - monthly
|
||||
# - missingok
|
||||
# - notifempty
|
||||
# - compress
|
||||
logrotate_applications: []
|
||||
# logs:
|
||||
# - /var/log/apt/term.log
|
||||
# - /var/log/apt/history.log
|
||||
# options:
|
||||
# - rotate 12
|
||||
# - monthly
|
||||
# - missingok
|
||||
# - notifempty
|
||||
# - compress
|
||||
logrotate_applications:
|
||||
- name: nextcloud-snap-apache-php_errors
|
||||
logs:
|
||||
- /var/snap/nextcloud/current/apache/logs/*.log
|
||||
options:
|
||||
- daily
|
||||
- compress
|
||||
- rotate 6
|
||||
- missingok
|
||||
- copytruncate
|
||||
- delaycompress
|
||||
|
||||
- name: nextcloud-snap-apache-error_log"
|
||||
logs:
|
||||
- /var/snap/nextcloud/current/apache/logs/error_log
|
||||
options:
|
||||
- daily
|
||||
- compress
|
||||
- rotate 6
|
||||
- missingok
|
||||
- copytruncate
|
||||
- delaycompress
|
||||
|
||||
- name: custom
|
||||
logs:
|
||||
- /var/log/custom/*_log
|
||||
options:
|
||||
- daily
|
||||
- compress
|
||||
- rotate 6
|
||||
|
||||
- name : dpkg
|
||||
logs:
|
||||
- /var/log/dpkg.log
|
||||
options:
|
||||
- daily
|
||||
- compress
|
||||
- rotate 6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue