ansible-logrotate icon indicating copy to clipboard operation
ansible-logrotate copied to clipboard

Postrotate not working

Open jp1987 opened this issue 6 years ago • 0 comments

I use the following config:

logrotate_scripts:
  - name: node
    path: "/var/log/forever/*.log"
    options:
      - daily
      - dateext
      - missingok
      - rotate 30
      - compress
      - delaycompress
      - notifempty
      - copytruncate
    scripts:
      postrotate: "mv /var/log/forever/*.gz /var/log/forever/archive"

The logs are never rotated into the archive folder (running the command manually works). What am I doing wrong?

jp1987 avatar Jul 23 '18 07:07 jp1987