mlocate
Version information
This version is compatible with:
- Puppet Enterprise >=3.2.0 <4.0.0
- Puppet >=3.0.0 <4.2.0
- RedHat,CentOS
Start using this module
Add this module to your Puppetfile:
mod 'adamcrews-mlocate', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
mlocate
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with mlocate
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- Contributors
Overview
Install and manage the mlocate/updatedb package.
Module Description
Mlocate is a useful tool that does a find of your system and records the files present. It's a bit old, not commonly used, irrelevant on disposable systems, but I like it, so get off my lawn.
Setup
What mlocate affects
- installs the mlocate package
- removes the default cron job, and replaces it with one that is splayed via fqdn_rand
Setup Requirements
You need a modern puppetlabs/stdlib.
Beginning with mlocate
Everything can be configured via the default mlocate class.
Usage
Basic usage that will result is a setup very close to a default CentOS configuration
include ::mlocate
Exclude some directories:
class { '::mlocate':
extra_prunepaths => [ '/exports', '/data' ],
}
Reference
Classes
Public Classes
- mlocate: Main class, includes other classes.
Private Classes
- mlocate::params: default parameters.
- mlocate::install: install and configure the software.
- mlocate::cron: setup the cron job.
###Parameters
The following parameters are available as options to the default mlocate class.
####package_name
The name of the package to install. Default: mlocate
####package_ensure
Ensure the package is present, latest, or absent. Default: present
####update_command
The name of the updatedb wrapper script. Default: /usr/local/bin/mlocate.cron
####update_on_install
Run an initial update when the package is installed. Default: true
####conf_file
The configuration file for updatedb. Default: /etc/updatedb.conf
####cron_ensure
Ensure the cron jobs is present or absent. Default: present
####cron_schedule
The standard cron time schedule. Default: once a week based on fqdn_rand
####prune_bind_mounts
Prune out bind mounts or not. Default: yes Refer to the updatedb.conf man page for more detail. On redhat 5 systems defaults to none.
####prunenames
Prune out directories matching this pattern. Default: .git .hg .svn Refer to the updatedb.conf man page for more detail. On redhat 5 systems defaults to none.
####extra_prunenames
Prune out additional directories matching this pattern. Default: none
####prunefs
Prune out these FS types. Default: refer to the params.pp Refer to the updatedb.conf man page for more detail.
####extra_prunefs
Prune out additional directories matching this pattern. Default: none
####prunepaths
Prune out paths matching this pattern. Default: refer to params.pp Refer to the updatedb.conf man page for more detail.
####extra_prunepaths
Prune out additional directories matching this pattern. Default: none
Limitations
This has only been tested on CentOS 6.5, but should work fine on any RHEL based system, versions 4+
Development
Please add spec tests, and submit PR's from a branch.
ToDo
More spec tests are needed.
Contributors
Contributors can be found on github.
2015-05-26 08:41:12 -0700 Adam Crews
* Fixed quoting on param (HEAD, spec_update)
2015-05-26 08:40:55 -0700 Adam Crews
* Fixed tests to better check content
2015-05-26 06:32:19 -0700 Adam Crews
* Fix license name (origin/spec_update)
2015-05-26 06:28:34 -0700 Adam Crews
* Update spec tests, prep for a release
2015-05-26 14:01:10 +0200 Steve Traylen
* Eplicitly specify origin of class variables
2015-05-26 13:35:13 +0200 Steve Traylen
* Typo in error message
2015-05-26 13:33:23 +0200 Steve Traylen
* Ensure default works on redhat 5 systems. In particular it avoids the following error:
2015-05-26 13:25:10 +0200 Steve Traylen
* Tests on contents of updatedb.conf
2014-12-02 12:03:15 -0800 Adam Crews
* Fixed badge url
2014-12-02 12:01:23 -0800 Adam Crews
* Added forge badge
2014-07-30 13:55:24 -0700 Adam Crews
* Fix bad template (tag: v0.1.2)
2014-07-30 13:31:57 -0700 Adam Crews
* Fix metadata name (tag: v0.1.1)
2014-07-30 13:28:25 -0700 Adam Crews
* Add build status to README
2014-07-30 13:25:22 -0700 Adam Crews
* Fix metadata (tag: v0.1.0)
2014-07-30 13:15:24 -0700 Adam Crews
* Initial commit