40 lines
1.1 KiB
Django/Jinja
40 lines
1.1 KiB
Django/Jinja
{{ ansible_managed | comment('plain', decoration='## ') }}
|
|
## /etc/logrotate.d/osquery
|
|
/var/log/osquery/osqueryd.results.log {
|
|
rotate {{ osquery_logrotate_days|int }}
|
|
daily
|
|
missingok
|
|
notifempty
|
|
delaycompress
|
|
compress
|
|
create 640 root adm
|
|
sharedscripts
|
|
}
|
|
{% if osquery_syslog_target is defined and osquery_syslog_target != '' and '/var/log/' in osquery_syslog_target %}
|
|
{{ osquery_syslog_target }} {
|
|
rotate {{ osquery_logrotate_days|int }}
|
|
daily
|
|
missingok
|
|
notifempty
|
|
delaycompress
|
|
compress
|
|
create 640 root adm
|
|
sharedscripts
|
|
# Ubuntu: parent directory has insecure permissions (It's world writable or writable by group which is not "root")
|
|
su root {{ osquery_syslog_dir_group | default(varlog_group) }}
|
|
}
|
|
{% endif %}
|
|
{% if osquery_syslog_target2 is defined and osquery_syslog_target2 != '' and '/var/log/' in osquery_syslog_target2 %}
|
|
{{ osquery_syslog_target2 }} {
|
|
rotate {{ osquery_logrotate_days|int }}
|
|
daily
|
|
missingok
|
|
notifempty
|
|
delaycompress
|
|
compress
|
|
create 640 root adm
|
|
sharedscripts
|
|
su root {{ osquery_syslog_dir_group2 | default(varlog_group) }}
|
|
}
|
|
{% endif %}
|