ReleaseEngineering/PuppetAgain/Modules/ccache

From MozillaWiki
Jump to: navigation, search

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".