racker/cookbook-cleanup

Name: cookbook-cleanup

Owner: racker

Description: This cookbook creates a `cleanup` resource to handle the cleanup of arbitrary paths based on number of files or last modified dates.

Created: 2014-03-04 16:40:22.0

Updated: 2018-01-31 13:13:09.0

Pushed: 2018-02-11 11:16:05.0

Homepage: null

Size: 28

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Chef cookbook

Description

This cookbook creates a cleanup resource to handle the cleanup of arbitrary paths based on number of files or last modified dates.

Attributes

keep_last and older_than are mutally exclusive since I can't think of any way combining them makes sense.

Usage

Include the cookbook then just call the cleanup resource from your recipe like this:

Keep the most recent 5 files
nup "/your/path/here/*" do
ep_last 5

Delete files older than 1 week
nup "/your/path/here/*" do
der_than :weeks => 1


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.