Giter VIP home page Giter VIP logo

ansible-role-logrotate's Introduction

A creative nerd

I like nerding-out, specifically around Ansible and Terraform automated test and infrastucture.

Always willing to help, love to learn and work with people.

Anurag's github stats

ansible-role-logrotate's People

Contributors

aisbergg avatar daisydomergue avatar disaster avatar robert-de-bock avatar robertdebock avatar walbertus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ansible-role-logrotate's Issues

Allow specifying multiple paths and postrotate commands for a logrotate entry

Proposed feature

It should be possible to specify a list for the path and postrotate variable in a logrotate entry, instead of just a single string.

Rationale

It is perfectly fine in logrotate to give multiple postrotate commands and paths to files that should be rotated, especially when one wants to simply apply the same ruleset on multiple paths.

Since it is currently only possible to specify a single path in a logrotate entry, you would need to duplicate the same entry over and over where just the logfile changes to achieve this same behaviour, which seems unnecessary.

Add delaycompress option

Proposed feature

Addition of delaycompress option

Rationale

Delay compress is useful when you regularly read log files.
It is also a must when daemons may not switch over from old to new logs quickly

Add dateyesterday feature to role

Proposed feature

add the dateyesterday feature of logrotate to enable rotated logs at midnight to have corresponding date

Rationale

Why is this feature required?

I rotate logs at midnight and the rotated files have dates of the time they are created rather than the actual time of the contents

Additional context

Add any other context about the feature request here.

Please consider sponsoring me.

Remove excess blank lines in logrotate.d files

Proposed feature

The excess lines generated by the template is very annoying and unnecessary

Rationale

It looks like the blank lines were added to make the template more readable for easier updates

Additional context

Please consider sponsoring me.

Problem with configuration template

Running this role produces the following error on Debian 10:

fatal: [node001]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'logrotate_service' is undefined\n\nThe error appears to be in '/mnt/nfs/ansible/roles/robertdebock.logrotate/tasks/main.yml': line 29, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: start and enable logrotate\n ^ here\n" }

`logrotate_keep` cannot be `-1` even it is a valid value

Hi and thank for this Ansible role.

I wanted to setup a logrotate that always keep logs with the value -1 but it is denied by the role : I got the following error message :

TASK [logrotate : assert | Test if logrotate_keep is set correctly] **************************************************************************************************************************
fatal: [192.168.1.21 -> localhost]: FAILED! => {"assertion": "logrotate_keep >= 0", "changed": false, "evaluated_to": false, "msg": "Assertion failed"}

The man of logrotate says :

❯ man logrotate | grep '\-1'
              [...] If count is -1, old logs are not removed at all, except they are affected by maxage (use with caution, may waste performance and disk space).  Default is 0.

May be the test should be logrotate_keep >= -1 ?

Thanks again.
Best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.