Coder Social home page Coder Social logo

logrotateusingansible's Introduction

Logrotate using Ansible

As per Logrotate Github page: The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal, and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size.

Logrotate can be used to do the following things:

  1. Rotate a file based on size and time
  2. Add date to the log file which helps during debugging
  3. Create new log files with required permissions
  4. Remove old log files
  5. Run custom commands before and after log rotation
  6. Compress log files to save space

playbook.yml is main ansible file which is executed by ansible command.

Steps to execute this project:

  1. Clone this project on your local machine
  2. Start your ubuntu instance with port 22 open to be accessed from your local machine
  3. Update inventory file with correct IP address of an ubuntu instance
  4. Execute Ansible command mentioned below:

Ansible command: ansible-playbook playbook.yml

More information about ansible can be found here.

logrotateusingansible's People

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.