ReleaseEngineering/PuppetAgain/Modules/config

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 handles retrieving and access of the org specific config values.

Summary

Configuration is specified in an org-specific file, manifests/$org-config.pp, which is symlinked from manifests/config.pp. This file defines a class, "config", which inherits from "config::base", which defines all config variables. The inherited class only needs to define variables whose values must change.

Usage

in manifests

class foo {
  include config
  if ($config::builder_username == "")
     fail("bad settings")
  }
}

in templates (note use of empty namespace designation)

Username is <%= scope.lookupvar('::config::builder_username') %>

Variables

The available configuration variables are all listed in modules/config/manifests/base.pp; refer to that file for the most up-to-date information.

Functions

This module also defines the secret function; see ReleaseEngineering/PuppetAgain/Secrets.