ReleaseEngineering/PuppetAgain/Modules/ccache

From MozillaWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This module manages ccache directories.

ccache::ccache_dir

This define manages a ccache directory. It takes the following parameters:

name
The directory to manage. You do not need to set name explicitly, rather the name of the resource is used as the name parameter.
owner
User/group owner for this directory.
maxsize
Maximum size for this ccache directory. This should be a string like "10G" for 10 GB. See ccache manpage for supported formats.
mode
Directory permissions. defaults to 0755

Example

ccache::ccache_dir {
  "/builds/ccache":
    owner => "cltbld",
    maxsize => "10G";
}

Notes

ccache::ccache_dir maintains a file *inside* the ccache directory called ".puppet-maxsize" which records the $maxsize parameter. This is used to prevent constantly re-running "ccache -M$maxsize" every time puppet is run, and instead only run "ccache -M$maxsize" when $maxsize is changed. Running "ccache -C" deletes this file however, so will trigger an extra invocation of "ccache -M$maxsize".