Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Puppet Labs Standard Library module. Please submit issues at https://projects.puppetlabs.com/projects/modules/issues and not using the issue tracker on Github. Pull requests, however, are encouraged. =)

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 manifests
Octocat-spinner-32 spec
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Modulefile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 RELEASE_PROCESS.markdown
README.markdown

Puppet Labs Standard Library

This module provides a "standard library" of resources for developing Puppet Modules. This modules will include the following additions to Puppet

  • Stages
  • Facts
  • Functions
  • Defined resource types
  • Types
  • Providers

This module is officially curated and provided by Puppet Labs. The modules Puppet Labs writes and distributes will make heavy use of this standard library.

Compatibility

This module is designed to work with Puppet version 2.6 and later. It may be forked if Puppet 2.7 specific features are added. There are currently no plans for a Puppet 0.25 standard library module.

Functions

Please see puppet doc -r function for documentation on each function. The current list of functions is:

  • getvar
  • has_key
  • loadyaml
  • merge.rb
  • validate_array
  • validate_bool
  • validate_hash
  • validate_re
  • validate_string

validate_hash

$somehash = { 'one' => 'two' }
validate\_hash($somehash)

getvar()

This function aims to look up variables in user-defined namespaces within puppet. Note, if the namespace is a class, it should already be evaluated before the function is used.

$namespace = 'site::data'
include "${namespace}"
$myvar = getvar("${namespace}::myvar")
Something went wrong with that request. Please try again.