Git Product home page Git Product logo

ansible-role-openio-logrotate's Introduction

Role Name

This Ansible role is intended initially to manage OpenIO logrotate file (/etc/logrotate.d/openio-sds) and it installs logrotate pkg. But it manage /etc/logrotate.conf and other files in /etc/logrotate.d/ too.

Requirements

Ansible: 2.2

Role Variables

All variables for OpenIO logrotate are configured in defaults/main.yml. It's afford all existing option in logrotate software (see man logrotate)

If you want to add a file it could be done by:

  - filename: app.conf
    sections:
    - logs: [ '/var/log/app/app.log' ]
      options: |
        missingok
        notifempty
        hourly
        rotate 24
        compress
        sharedscripts
        postrotate: '/bin/kill -HUP `cat /var/run/app.pid 2> /dev/null` 2> /dev/null || true'

Playbook

There are two possible playbooks (it always install logrotate if not present):

One for only configure OpenIO logrotate:

---
- name: Install and configure logrotate for OpenIO
  hosts: servers
  roles:
    - { role: ansible-role-openio-logrotate }

And the second that manage /etc/logrotate.conf too:

---
- name: Install and configure logrotate for OpenIO
  hosts: servers
  roles:
    - { role: ansible-role-openio-logrotate, logrotate_enabled: True }

License

Apache 2.0

Author Information

Lapierre Sébastien (http://www.openio.io/)

ansible-role-openio-logrotate's People

Contributors

racciari avatar sebastienlapierre avatar

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.