nginx/ansible-role-nginx-config

Logrotate does not format correctly

Closed this issue · 2 comments

tibz7 commented

Describe the bug

The logrotate is not correclty formatted

To reproduce

Steps to reproduce the behavior:

it looks like that when deployed

/var/log/nginx/*.log
{
    d
    a
    i
    l
    y
    postrotate
        if [ -f /var/run/nginx.pid ]; then
            kill -USR1 `cat /var/run/nginx.pid`
        fi
    endscript
}

Expected behavior

/var/log/nginx/*.log
{
    daily
    postrotate
        if [ -f /var/run/nginx.pid ]; then
            kill -USR1 `cat /var/run/nginx.pid`
        fi
    endscript
}

Your environment

debian 12

This role does not configure logrotate. Are you perhaps using the main Ansible NGINX role (https://github.com/nginxinc/ansible-role-nginx) instead? If so, can you post your Ansible task config? Otherwise, are you maybe using a different role or task to configure logrotate?