Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >=3.4.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'adamcrews-mlocate', '0.4.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
####cron_daily_path
The path to cron.daily file installed by mlocate and that is removed
####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.
Misc
With the 0.3.0 release, the cron job times will likely change as an extra seed argument has been added to the fqdn_rand function calls. This is a workaround for https://tickets.puppetlabs.com/browse/PUP-5646
Contributors
Contributors can be found on github.
2016-01-05 08:56:32 -0800 Adam Crews
* Forgot to bump release (HEAD -> fqdn_rand_fix2)
2016-01-05 08:53:10 -0800 Adam Crews
* Implement better fix for fqdn_rand issues (origin/fqdn_rand_fix2)
2016-01-04 14:55:03 -0800 Adam Crews
* Fix metadata version_requirements (origin/fix_metadata)
2016-01-04 14:35:19 -0800 Adam Crews
* Updates to travis build info
2016-01-04 14:34:56 -0800 Adam Crews
* Add additional seed to fqdn_rand calls, thanks to @traylenator
2015-10-07 13:06:28 -0700 Adam Crews
* Cut new release (tag: v0.2.1)
2015-10-07 12:30:29 -0700 msweetser
* Fixed typo in dependencies in metadata.json
2015-05-26 08:41:12 -0700 Adam Crews
* Fixed quoting on param
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
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
Dependencies
- puppetlabs/stdlib (>= 4.3.0 <5.0.0)