Forge Home

puppet_maint

Provides Tidy resources for cleaning up various Puppet directories.

10,447 downloads

10,447 latest version

2.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.1 (latest)
released May 15th 2012

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rcoleman-puppet_maint', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rcoleman-puppet_maint
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rcoleman-puppet_maint --version 0.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

rcoleman/puppet_maint — version 0.0.1 May 15th 2012

Module: puppet_maint

Provides Tidy resources for cleaning up various Puppet directories.

About

Through a single parameterized class (puppet_maint), you may turn on and configure maintenance of the following items:

  • Puppet Reports
  • Client FileBucket
  • Master FileBucket

Parameters

$tidy_reports -- Whether to remove old reports

  • Accepts boolean true or false (defaults to false)

    $tidy_master_filebucket -- Whether to remove old content from the master filebucket

  • Accepts boolean true or false (defaults to false)

    $tidy_client_filebucket -- Whether to remove old content form the client filebucket

  • Accepts boolean true or false (defaults to false)

    $max_report_age -- Maximum accepted report age

  • Accepts a string based on the below criteria (defaults to '4w')

    $max_filebucket_age -- Maximum accepted age for bucket content

  • Accepts a string based on the below criteria (defaults to '4w')

Criteria for age variable values (from Tidy):

Example Usage

In the simplest use, you'd declare the class in site.pp for all of your agents.

Dependancies

This module requires puppetlabs-stdlib for the puppet_vardir fact which makes the resources work properly on both FOSS and PE Puppet deployments.

Known Issues

  • Filebucket Tidy's will tidy $vardir/bucket or $vardir/clientbucket if they're empty. Puppet recreates them next Puppet run.
  • Unless this module uses the PE facts from facts.d, Tidy[tidy_master_filebucket] will attempt to run on client systems, resulting in "info: /Stage[main]/Puppet_maint/Tidy[tidy_master_filebucket]: File does not exist"
    • Same with Tidy[tidy_puppet_reports]
    • This does not cause failed runs, just a couple extra and useless resources on agent systems.

Contributions Needed

  • Resolved Known Issues
  • Spec Tests
  • Way of determining agent vs master roles without PE specific facts
  • Extra stuff that you're thinking about
    • Keep in mind that the interface should be simple boolean triggers, defaulting to not purging files from a system.