Repository navigation
Expand file tree
/
Copy pathmetadata.json
More file actions
33 lines (33 loc) · 2.81 KB
/
Copy pathmetadata.json
File metadata and controls
33 lines (33 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"name": "chef-janitor",
"description": "A General Cookbook used to cleanup files and directories on nodes",
"long_description": "Description\n===========\nThis cookbook is meant to keep order on a running node to purge files\non the filesystem that are unwanted. You could also apply some criteria to the files\nthat are targeted such as glob patterns, age, and size.\n\nRequirements\n============\nChef, Linux\n\nActions\n=======\n\n:purge\n---------------------------------------------------------------\n Purge the files in the directory as either the resource name,\n or the path attribute to the janitor_directory LWRP\n Can also apply criteria such age file age, file size\n \nAttributes\n==========\nNo attributes are required for the use of this cookbook\n\nUsage\n=====\nAn LWRP \"janitor_directory\" is provided for declaring a directory\nfor which to search in and purge files in that directory.\nSome criteria can also be supplied to include an age and size threshold.\n\nLWRP\n----\n\njanitor\\_directory\n--------------\n\n### Parameters:\n\n* `path` - Resource name or path parameter will pass the path to be examined to the lwrp\n* `include_files` - Array of glob patterns of files to include in the search criteria\n* `exclude_files` - Array of glob patterns of files to exclude in the search criteria\n* `age` - The age in days of files to include in the search criteria\n* `size` - The size of files to include in the search criteria\n* `recursive` - enable recursive searching from the path indicated in the resource\n\nExamples\n========\n\nDelete all files in /tmp with the .log extension\n\n janitor_directory \"/tmp\" do\n include_files [\"*.log\"]\n action :purge\n end\n\nThis will delete all files with the .log extension in /tmp\n\n janitor_directory \"/tmp\" do\n include_files [\"*.log\"]\n action :purge\n end\n\nDelete all files in the /var/log directory recursively that are larger than 1 MegaByte\n\n janitor_directory \"/var/log\" do\n include_files [\"*.log\"]\n size \"1M\"\n recursive\t true\n action :purge\n end\n\nDelete all files in the /var/log directory recursively that are older than 5 days\n\n janitor_directory \"/var/log\" do\n include_files\t[\"*.log\"]\n age 5\n recursive true\n action :purge\n end\n\n\n",
"maintainer": "Mark Pimentel",
"maintainer_email": "markpimentel22@gmail.com",
"license": "Apache 2.0",
"platforms": {
"redhat": ">= 0.0.0",
"centos": ">= 0.0.0",
"debian": ">= 0.0.0",
"ubuntu": ">= 0.0.0"
},
"dependencies": {
},
"recommendations": {
},
"suggestions": {
},
"conflicting": {
},
"providing": {
},
"replacing": {
},
"attributes": {
},
"groupings": {
},
"recipes": {
},
"version": "0.0.6"
}