Giter VIP home page Giter VIP logo

puppet-logrotate's Introduction

Puppet module: logrotate

This is a Puppet module for logrotate It provides only package installation and file configuration.

Based on Example42 layouts by Alessandro Franceschi / Lab42

Official site: http://www.example42.com

Official git repository: http://github.com/example42/puppet-logrotate

The logrotate::rule define has been adapted from:

https://github.com/rodjek/puppet-logrotate/blob/master/templates/etc/logrotate.d/rule.erb

Released with this licence: https://github.com/rodjek/puppet-logrotate/blob/master/LICENSE

The logrotate::conf define has been adapted from:

https://github.com/arioch/puppet-logrotate/blob/master/manifests/file.pp

Released with this license: https://github.com/arioch/puppet-logrotate/blob/master/LICENSE

Released under the terms of Apache 2 License.

This module requires the presence of Example42 Puppi module in your modulepath.

USAGE - Module specific

This module provides different options on how to manage logrotate configuration files.

You can configure the main configuration file with the source or template parameters

You can configure the single logrotate configuration snippets in several ways:

  • You can populate the whole logrotate.d with the source_dir parameter

  • You can create a single configuration snippet with these alternative defines:

    • logrotate::rule - Create snippets based of a lot parameters for each option

    • logrotate::conf - Create snippets based of a configurable template and the provided options

    • logrotate::file - Provide directly a custom file from the source you want

Refer to the documentation in the single defines for details on the option's usage.

All the methods are alternative but can cohexist, it's up to you to use the alternative that better fits your needs.

USAGE - Basic management

  • Install logrotate with default settings

      class { 'logrotate': }
    
  • Install a specific version of logrotate package

      class { 'logrotate':
        version => '1.0.1',
      }
    
  • Remove logrotate resources (it automatically removes also the files provided by the logrotate::rule logrotate::conf and logrotate::file defines

      class { 'logrotate':
        absent => true
      }
    
  • Enable auditing without without making changes on existing logrotate configuration files

      class { 'logrotate':
        audit_only => true
      }
    
  • Module dry-run: Do not make any change on all the resources provided by the module. It applies also to logrotate::rule logrotate::conf and logrotate::file defines

      class { 'logrotate':
        noops => true
      }
    

USAGE - Overrides and Customizations

  • Use custom sources for main config file

      class { 'logrotate':
        source => [ "puppet:///modules/example42/logrotate/logrotate.conf-${hostname}" , "puppet:///modules/example42/logrotate/logrotate.conf" ], 
      }
    
  • Use custom source directory for the whole configuration dir

      class { 'logrotate':
        source_dir       => 'puppet:///modules/example42/logrotate/conf/',
        source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir
      }
    
  • Use custom template for main config file. Note that template and source arguments are alternative.

      class { 'logrotate':
        template => 'example42/logrotate/logrotate.conf.erb',
      }
    
  • Automatically include a custom subclass

      class { 'logrotate':
        my_class => 'example42::my_logrotate',
      }
    

Build Status

puppet-logrotate's People

Contributors

alvagante avatar bobtfish avatar mburger avatar nemacysts avatar ronaldgrn avatar sgrimee avatar vulpine avatar

Watchers

Maksym Melnychok avatar  avatar Nathan Handler avatar Josh Snyder avatar M Carlson avatar Ben Chess avatar Zach Musgrave avatar Evan Krall avatar Kyle Cascade avatar Paul O'Connor avatar Keshav Varma avatar John Billings avatar Giuliano Cioffi avatar Sarguru Nathan avatar James Cloos avatar  avatar Rob Johnson avatar Joseph Lynch avatar Lee Briggs avatar Philip Mulcahy avatar Vipul Singh avatar Jen Patague avatar Huadong Liu avatar Brian Trump avatar Ryan Irwin avatar Matt avatar Michael Osman avatar Brian Chand avatar  avatar Chastity Blackwell avatar Steve Young avatar  avatar

Forkers

ronaldgrn

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.