annotate modules/stdlib/README.markdown @ 246:c3fa3d65aa83

Update configs for Puppet 6 This *should* all be backward compatible
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Dec 2019 14:19:47 -0500
parents addb0ea390a1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
1 #stdlib
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 [![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-stdlib.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-stdlib)
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
5 ####Table of Contents
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
6
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
7 1. [Overview](#overview)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
8 2. [Module Description - What the module does and why it is useful](#module-description)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
9 3. [Setup - The basics of getting started with stdlib](#setup)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
10 4. [Usage - Configuration options and additional functionality](#usage)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
11 5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
12 5. [Limitations - OS compatibility, etc.](#limitations)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
13 6. [Development - Guide for contributing to the module](#development)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
14
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
15 ##Overview
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
16
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
17 Adds a standard library of resources for Puppet modules.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
18
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
19 ##Module Description
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
20
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
21 This module provides a standard library of resources for the development of Puppet
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
22 modules. Puppet modules make heavy use of this standard library. The stdlib module adds the following resources to Puppet:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 * Stages
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 * Facts
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 * Functions
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 * Defined resource types
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 * Types
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 * Providers
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
30
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
31 > *Note:* As of version 3.7, Puppet Enterprise no longer includes the stdlib module. If you're running Puppet Enterprise, you should install the most recent release of stdlib for compatibility with Puppet modules.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
33 ##Setup
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
34
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
35 Installing the stdlib module adds the functions, facts, and resources of this standard library to Puppet.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
36
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
37 ##Usage
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
39 After you've installed stdlib, all of its functions, facts, and resources are available for module use or development.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
40
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
41 If you want to use a standardized set of run stages for Puppet, `include stdlib` in your manifest.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
42
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
43 ## Reference
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
45 ### Classes
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
46
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
47 #### Public Classes
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
48
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
49 * `stdlib`: Most of stdlib's features are automatically loaded by Puppet. To use standardized run stages in Puppet, declare this class in your manifest with `include stdlib`.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
50
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
51 When declared, stdlib declares all other classes in the module. The only other class currently included in the module is `stdlib::stages`.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
53 The stdlib class has no parameters.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
54
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
55 #### Private Classes
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
56
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
57 * `stdlib::stages`: This class manages a standard set of run stages for Puppet. It is managed by the stdlib class and should not be declared independently.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
58
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
59 The `stdlib::stages` class declares various run stages for deploying infrastructure, language runtimes, and application layers. The high level stages are (in order):
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
61 * setup
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
62 * main
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
63 * runtime
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
64 * setup_infra
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
65 * deploy_infra
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
66 * setup_app
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
67 * deploy_app
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
68 * deploy
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
70 Sample usage:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
72 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
73 node default {
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
74 include stdlib
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
75 class { java: stage => 'runtime' }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
76 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
77 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
78
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
79 ### Resources
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
80
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
81 * `file_line`: This resource ensures that a given line, including whitespace at the beginning and end, is contained within a file. If the line is not contained in the given file, Puppet will add the line. Multiple resources can be declared to manage multiple lines in the same file. You can also use match to replace existing lines.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
82
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
83 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
84 file_line { 'sudo_rule':
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
85 path => '/etc/sudoers',
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
86 line => '%sudo ALL=(ALL) ALL',
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
87 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
88 file_line { 'sudo_rule_nopw':
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
89 path => '/etc/sudoers',
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
90 line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
91 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
92 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
93
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
94 * `after`: Specify the line after which Puppet will add any new lines. (Existing lines are added in place.) Optional.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
95 * `ensure`: Ensures whether the resource is present. Valid values are 'present', 'absent'.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
96 * `line`: The line to be added to the file located by the `path` parameter.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
97 * `match`: A regular expression to run against existing lines in the file; if a match is found, we replace that line rather than adding a new line. Optional.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
98 * `multiple`: Determine if match can change multiple lines. Valid values are 'true', 'false'. Optional.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
99 * `name`: An arbitrary name used as the identity of the resource.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
100 * `path`: The file in which Puppet will ensure the line specified by the line parameter.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
101
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
102 ### Functions
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
104 * `abs`: Returns the absolute value of a number; for example, '-34.56' becomes '34.56'. Takes a single integer and float value as an argument. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
106 * `any2array`: This converts any object to an array containing that object. Empty argument lists are converted to an empty array. Arrays are left untouched. Hashes are converted to arrays of alternating keys and values. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
108 * `base64`: Converts a string to and from base64 encoding.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
109 Requires an action ('encode', 'decode') and either a plain or base64-encoded
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
110 string. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
111
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
112 * `bool2num`: Converts a boolean to a number. Converts values:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
113 * 'false', 'f', '0', 'n', and 'no' to 0.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
114 * 'true', 't', '1', 'y', and 'yes' to 1.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
115 Requires a single boolean or string as an input. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
117 * `capitalize`: Capitalizes the first letter of a string or array of strings.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
118 Requires either a single string or an array as an input. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
119
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
120 * `chomp`: Removes the record separator from the end of a string or an array of
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
121 strings; for example, 'hello\n' becomes 'hello'. Requires a single string or array as an input. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
122
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
123 * `chop`: Returns a new string with the last character removed. If the string ends with '\r\n', both characters are removed. Applying `chop` to an empty string returns an empty string. If you want to merely remove record separators, then you should use the `chomp` function. Requires a string or an array of strings as input. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
124
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
125 * `concat`: Appends the contents of array 2 onto array 1. For example, `concat(['1','2','3'],'4')` results in: ['1','2','3','4']. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
127 * `count`: Takes an array as first argument and an optional second argument. Count the number of elements in array that matches second argument. If called with only an array, it counts the number of elements that are **not** nil/undef. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
128
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
129 * `defined_with_params`: Takes a resource reference and an optional hash of attributes. Returns 'true' if a resource with the specified attributes has already been added to the catalog. Returns 'false' otherwise.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
130
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
131 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
132 user { 'dan':
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
133 ensure => present,
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
134 }
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
135
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
136 if ! defined_with_params(User[dan], {'ensure' => 'present' }) {
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
137 user { 'dan': ensure => present, }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
138 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
139 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
140
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
141 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
143 * `delete`: Deletes all instances of a given element from an array, substring from a
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
144 string, or key from a hash. For example, `delete(['a','b','c','b'], 'b')` returns ['a','c']; `delete('abracadabra', 'bra')` returns 'acada'. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
146 * `delete_at`: Deletes a determined indexed value from an array. For example, `delete_at(['a','b','c'], 1)` returns ['a','c']. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
148 * `delete_values`: Deletes all instances of a given value from a hash. For example, `delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B')` returns {'a'=>'A','c'=>'C','B'=>'D'} *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
149
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
150 * `delete_undef_values`: Deletes all instances of the undef value from an array or hash. For example, `$hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false})` returns {a => 'A', b => '', d => false}. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
151
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
152 * `difference`: Returns the difference between two arrays.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
153 The returned array is a copy of the original array, removing any items that
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
154 also appear in the second array. For example, `difference(["a","b","c"],["b","c","d"])` returns ["a"].
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
156 * `dirname`: Returns the `dirname` of a path. For example, `dirname('/path/to/a/file.ext')` returns '/path/to/a'.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
157
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
158 * `downcase`: Converts the case of a string or of all strings in an array to lowercase. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
159
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
160 * `empty`: Returns 'true' if the variable is empty. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
161
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
162 * `ensure_packages`: Takes a list of packages and only installs them if they don't already exist. It optionally takes a hash as a second parameter to be passed as the third argument to the `ensure_resource()` function. *Type*: statement
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
163
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
164 * `ensure_resource`: Takes a resource type, title, and a list of attributes that describe a resource.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
165
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
166 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
167 user { 'dan':
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
168 ensure => present,
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
169 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
170 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
171
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
172 This example only creates the resource if it does not already exist:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
173
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
174 `ensure_resource('user', 'dan', {'ensure' => 'present' })`
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
175
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
176 If the resource already exists, but does not match the specified parameters, this function attempts to recreate the resource, leading to a duplicate resource definition error.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
177
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
178 An array of resources can also be passed in, and each will be created with the type and parameters specified if it doesn't already exist.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
179
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
180 `ensure_resource('user', ['dan','alex'], {'ensure' => 'present'})`
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
181
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
182 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
183
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
184 * `flatten`: This function flattens any deeply nested arrays and returns a single flat array as a result. For example, `flatten(['a', ['b', ['c']]])` returns ['a','b','c']. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
185
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
186 * `floor`: Returns the largest integer less than or equal to the argument.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
187 Takes a single numeric value as an argument. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
188
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
189 * `fqdn_rotate`: Rotates an array a random number of times based on a node's fqdn. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
190
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
191 * `get_module_path`: Returns the absolute path of the specified module for the current environment.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
192
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
193 `$module_path = get_module_path('stdlib')`
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
194
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
195 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
196
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
197 * `getparam`: Takes a resource reference and the name of the parameter and
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
198 returns the value of the resource's parameter. For example, the following code returns 'param_value'.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
199
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
200 *Example:*
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
201
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
202 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
203 define example_resource($param) {
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
204 }
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
205
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
206 example_resource { "example_resource_instance":
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
207 param => "param_value"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
208 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
209
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
210 getparam(Example_resource["example_resource_instance"], "param")
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
211 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
212
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
213 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
214
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
215 * `getvar`: Lookup a variable in a remote namespace.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
216
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
217 For example:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
218
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
219 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
220 $foo = getvar('site::data::foo')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
221 # Equivalent to $foo = $site::data::foo
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
222 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
223
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
224 This is useful if the namespace itself is stored in a string:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
225
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
226 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
227 $datalocation = 'site::data'
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
228 $bar = getvar("${datalocation}::bar")
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
229 # Equivalent to $bar = $site::data::bar
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
230 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
231
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
232 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
233
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
234 * `grep`: This function searches through an array and returns any elements that match the provided regular expression. For example, `grep(['aaa','bbb','ccc','aaaddd'], 'aaa')` returns ['aaa','aaaddd']. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
235
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
236 * `has_interface_with`: Returns boolean based on kind and value:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
237 * macaddress
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
238 * netmask
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
239 * ipaddress
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
240 * network
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
241
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
242 *Examples:*
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
243
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
244 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
245 has_interface_with("macaddress", "x:x:x:x:x:x")
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
246 has_interface_with("ipaddress", "127.0.0.1") => true
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
247 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
248
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
249 If no kind is given, then the presence of the interface is checked:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
250
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
251 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
252 has_interface_with("lo") => true
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
253 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
254
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
255 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
256
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
257 * `has_ip_address`: Returns true if the client has the requested IP address on some interface. This function iterates through the `interfaces` fact and checks the `ipaddress_IFACE` facts, performing a simple string comparison. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
258
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
259 * `has_ip_network`: Returns true if the client has an IP address within the requested network. This function iterates through the 'interfaces' fact and checks the 'network_IFACE' facts, performing a simple string comparision. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
260
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
261 * `has_key`: Determine if a hash has a certain key value.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
262
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
263 *Example*:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
264
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
265 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
266 $my_hash = {'key_one' => 'value_one'}
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
267 if has_key($my_hash, 'key_two') {
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
268 notice('we will not reach here')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
269 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
270 if has_key($my_hash, 'key_one') {
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
271 notice('this will be printed')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
272 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
273 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
274
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
275 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
276
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
277 * `hash`: This function converts an array into a hash. For example, `hash(['a',1,'b',2,'c',3])` returns {'a'=>1,'b'=>2,'c'=>3}. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
278
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
279 * `intersection`: This function returns an array an intersection of two. For example, `intersection(["a","b","c"],["b","c","d"])` returns ["b","c"].
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
280
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
281 * `is_array`: Returns 'true' if the variable passed to this function is an array. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
282
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
283 * `is_bool`: Returns 'true' if the variable passed to this function is a boolean. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
284
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
285 * `is_domain_name`: Returns 'true' if the string passed to this function is a syntactically correct domain name. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
286
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
287 * `is_float`: Returns 'true' if the variable passed to this function is a float. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
288
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
289 * `is_function_available`: This function accepts a string as an argument and determines whether the Puppet runtime has access to a function by that name. It returns 'true' if the function exists, 'false' if not. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
290
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
291 * `is_hash`: Returns 'true' if the variable passed to this function is a hash. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
292
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
293 * `is_integer`: Returns 'true' if the variable returned to this string is an integer. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
294
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
295 * `is_ip_address`: Returns 'true' if the string passed to this function is a valid IP address. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
296
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
297 * `is_mac_address`: Returns 'true' if the string passed to this function is a valid MAC address. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
298
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
299 * `is_numeric`: Returns 'true' if the variable passed to this function is a number. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
300
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
301 * `is_string`: Returns 'true' if the variable passed to this function is a string. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
302
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
303 * `join`: This function joins an array into a string using a separator. For example, `join(['a','b','c'], ",")` results in: "a,b,c". *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
304
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
305 * `join_keys_to_values`: This function joins each key of a hash to that key's corresponding value with a separator. Keys and values are cast to strings. The return value is an array in which each element is one joined key/value pair. For example, `join_keys_to_values({'a'=>1,'b'=>2}, " is ")` results in ["a is 1","b is 2"]. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
306
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
307 * `keys`: Returns the keys of a hash as an array. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
308
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
309 * `loadyaml`: Load a YAML file containing an array, string, or hash, and return the data in the corresponding native data type. For example:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
310
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
311 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
312 $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
313 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
314
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
315 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
316
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
317 * `lstrip`: Strips leading spaces to the left of a string. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
318
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
319 * `max`: Returns the highest value of all arguments. Requires at least one argument. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
320
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
321 * `member`: This function determines if a variable is a member of an array. The variable can be either a string, array, or fixnum. For example, `member(['a','b'], 'b')` and `member(['a','b','c'], ['b','c'])` return 'true', while `member(['a','b'], 'c')` and `member(['a','b','c'], ['c','d'])` return 'false'. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
322
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
323 * `merge`: Merges two or more hashes together and returns the resulting hash.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
324
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
325 *Example*:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
326
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
327 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
328 $hash1 = {'one' => 1, 'two' => 2}
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
329 $hash2 = {'two' => 'dos', 'three' => 'tres'}
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
330 $merged_hash = merge($hash1, $hash2)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
331 # The resulting hash is equivalent to:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
332 # $merged_hash = {'one' => 1, 'two' => 'dos', 'three' => 'tres'}
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
333 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
334
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
335 When there is a duplicate key, the key in the rightmost hash "wins." *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
336
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
337 * `min`: Returns the lowest value of all arguments. Requires at least one argument. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
338
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
339 * `num2bool`: This function converts a number or a string representation of a number into a true boolean. Zero or anything non-numeric becomes 'false'. Numbers greater than 0 become 'true'. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
340
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
341 * `parsejson`: This function accepts JSON as a string and converts into the correct Puppet structure. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
342
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
343 * `parseyaml`: This function accepts YAML as a string and converts it into the correct Puppet structure. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
344
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
345 * `pick`: From a list of values, returns the first value that is not undefined or an empty string. Takes any number of arguments, and raises an error if all values are undefined or empty.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
346
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
347 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
348 $real_jenkins_version = pick($::jenkins_version, '1.449')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
349 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
350
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
351 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
352
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
353 * `prefix`: This function applies a prefix to all elements in an array. For example, `prefix(['a','b','c'], 'p')` returns ['pa','pb','pc']. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
354
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
355
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
356 * `private`: This function sets the current class or definition as private.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
357 Calling the class or definition from outside the current module will fail. For example, `private()` called in class `foo::bar` outputs the following message if class is called from outside module `foo`:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
358
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
359 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
360 Class foo::bar is private
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
361 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
362
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
363 You can specify the error message you want to use:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
364
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
365 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
366 private("You're not supposed to do that!")
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
367 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
368
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
369 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
370
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
371 * `range`: When given range in the form of '(start, stop)', `range` extrapolates a range as an array. For example, `range("0", "9")` returns [0,1,2,3,4,5,6,7,8,9]. Zero-padded strings are converted to integers automatically, so `range("00", "09")` returns [0,1,2,3,4,5,6,7,8,9].
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
372
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
373 Non-integer strings are accepted; `range("a", "c")` returns ["a","b","c"], and `range("host01", "host10")` returns ["host01", "host02", ..., "host09", "host10"].
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
374
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
375 *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
376
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
377 * `reject`: This function searches through an array and rejects all elements that match the provided regular expression. For example, `reject(['aaa','bbb','ccc','aaaddd'], 'aaa')` returns ['bbb','ccc']. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
378
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
379 * `reverse`: Reverses the order of a string or array. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
380
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
381 * `rstrip`: Strips leading spaces to the right of the string.*Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
382
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
383 * `shuffle`: Randomizes the order of a string or array elements. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
384
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
385 * `size`: Returns the number of elements in a string or array. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
386
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
387 * `sort`: Sorts strings and arrays lexically. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
388
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
389 * `squeeze`: Returns a new string where runs of the same character that occur in this set are replaced by a single character. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
390
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
391 * `str2bool`: This converts a string to a boolean. This attempts to convert strings that contain values such as '1', 't', 'y', and 'yes' to 'true' and strings that contain values such as '0', 'f', 'n', and 'no' to 'false'. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
392
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
393 * `str2saltedsha512`: This converts a string to a salted-SHA512 password hash, used for OS X versions >= 10.7. Given any string, this function returns a hex version of a salted-SHA512 password hash, which can be inserted into your Puppet
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
394 manifests as a valid password attribute. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
395
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
396 * `strftime`: This function returns formatted time. For example, `strftime("%s")` returns the time since epoch, and `strftime("%Y=%m-%d")` returns the date. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
397
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
398 *Format:*
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
399
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
400 * `%a`: The abbreviated weekday name ('Sun')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
401 * `%A`: The full weekday name ('Sunday')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
402 * `%b`: The abbreviated month name ('Jan')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
403 * `%B`: The full month name ('January')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
404 * `%c`: The preferred local date and time representation
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
405 * `%C`: Century (20 in 2009)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
406 * `%d`: Day of the month (01..31)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
407 * `%D`: Date (%m/%d/%y)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
408 * `%e`: Day of the month, blank-padded ( 1..31)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
409 * `%F`: Equivalent to %Y-%m-%d (the ISO 8601 date format)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
410 * `%h`: Equivalent to %b
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
411 * `%H`: Hour of the day, 24-hour clock (00..23)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
412 * `%I`: Hour of the day, 12-hour clock (01..12)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
413 * `%j`: Day of the year (001..366)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
414 * `%k`: Hour, 24-hour clock, blank-padded ( 0..23)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
415 * `%l`: Hour, 12-hour clock, blank-padded ( 0..12)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
416 * `%L`: Millisecond of the second (000..999)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
417 * `%m`: Month of the year (01..12)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
418 * `%M`: Minute of the hour (00..59)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
419 * `%n`: Newline (\n)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
420 * `%N`: Fractional seconds digits, default is 9 digits (nanosecond)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
421 * `%3N`: Millisecond (3 digits)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
422 * `%6N`: Microsecond (6 digits)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
423 * `%9N`: Nanosecond (9 digits)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
424 * `%p`: Meridian indicator ('AM' or 'PM')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
425 * `%P`: Meridian indicator ('am' or 'pm')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
426 * `%r`: Time, 12-hour (same as %I:%M:%S %p)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
427 * `%R`: Time, 24-hour (%H:%M)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
428 * `%s`: Number of seconds since 1970-01-01 00:00:00 UTC.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
429 * `%S`: Second of the minute (00..60)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
430 * `%t`: Tab character ( )
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
431 * `%T`: Time, 24-hour (%H:%M:%S)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
432 * `%u`: Day of the week as a decimal, Monday being 1. (1..7)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
433 * `%U`: Week number of the current year, starting with the first Sunday as the first day of the first week (00..53)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
434 * `%v`: VMS date (%e-%b-%Y)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
435 * `%V`: Week number of year according to ISO 8601 (01..53)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
436 * `%W`: Week number of the current year, starting with the first Monday as the first day of the first week (00..53)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
437 * `%w`: Day of the week (Sunday is 0, 0..6)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
438 * `%x`: Preferred representation for the date alone, no time
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
439 * `%X`: Preferred representation for the time alone, no date
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
440 * `%y`: Year without a century (00..99)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
441 * `%Y`: Year with century
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
442 * `%z`: Time zone as hour offset from UTC (e.g. +0900)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
443 * `%Z`: Time zone name
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
444 * `%%`: Literal '%' character
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
445
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
446
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
447 * `strip`: This function removes leading and trailing whitespace from a string or from every string inside an array. For example, `strip(" aaa ")` results in "aaa". *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
448
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
449 * `suffix`: This function applies a suffix to all elements in an array. For example, `suffix(['a','b','c'], 'p')` returns ['ap','bp','cp']. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
450
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
451 * `swapcase`: This function swaps the existing case of a string. For example, `swapcase("aBcD")` results in "AbCd". *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
452
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
453 * `time`: This function returns the current time since epoch as an integer. For example, `time()` returns something like '1311972653'. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
454
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
455 * `to_bytes`: Converts the argument into bytes, for example 4 kB becomes 4096.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
456 Takes a single string value as an argument. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
457
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
458 * `type`: Returns the type when passed a variable. Type can be a string, array, hash, float, integer, or boolean. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
459
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
460 * `union`: This function returns a union of two arrays. For example, `union(["a","b","c"],["b","c","d"])` returns ["a","b","c","d"].
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
461
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
462 * `unique`: This function removes duplicates from strings and arrays. For example, `unique("aabbcc")` returns 'abc'.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
463
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
464 You can also use this with arrays. For example, `unique(["a","a","b","b","c","c"])` returns ["a","b","c"]. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
465
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
466 * `upcase`: Converts a string or an array of strings to uppercase. For example, `upcase("abcd")` returns 'ABCD'. *Type*: rvalue
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
467
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
468 * `uriescape`: Urlencodes a string or array of strings. Requires either a single string or an array as an input. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
469
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
470 * `validate_absolute_path`: Validate that the string represents an absolute path in the filesystem. This function works for Windows and Unix-style paths.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
471 The following values will pass:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
472
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
473 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
474 $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
475 validate_absolute_path($my_path)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
476 $my_path2 = "/var/lib/puppet"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
477 validate_absolute_path($my_path2)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
478 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
479
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
480 The following values will fail, causing compilation to abort:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
481
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
482 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
483 validate_absolute_path(true)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
484 validate_absolute_path([ 'var/lib/puppet', '/var/foo' ])
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
485 validate_absolute_path([ '/var/lib/puppet', 'var/foo' ])
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
486 $undefined = undef
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
487 validate_absolute_path($undefined)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
488 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
489
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
490 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
491
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
492 * `validate_array`: Validate that all passed values are array data structures. Abort catalog compilation if any value fails this check.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
493
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
494 The following values will pass:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
495
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
496 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
497 $my_array = [ 'one', 'two' ]
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
498 validate_array($my_array)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
499 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
500
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
501 The following values will fail, causing compilation to abort:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
502
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
503 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
504 validate_array(true)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
505 validate_array('some_string')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
506 $undefined = undef
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
507 validate_array($undefined)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
508 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
509
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
510 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
511
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
512 * `validate_augeas`: Performs validation of a string using an Augeas lens.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
513 The first argument of this function should be the string to test, and the second argument should be the name of the Augeas lens to use. If Augeas fails to parse the string with the lens, the compilation aborts with a parse error.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
514
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
515 A third optional argument lists paths which should **not** be found in the file. The `$file` variable points to the location of the temporary file being tested in the Augeas tree.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
516
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
517 For example, to make sure your passwd content never contains user `foo`:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
518
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
519 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
520 validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo'])
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
521 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
522
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
523 To ensure that no users use the '/bin/barsh' shell:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
524
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
525 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
526 validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]']
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
527 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
528
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
529 You can pass a fourth argument as the error message raised and shown to the user:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
530
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
531 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
532 validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
533 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
534
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
535 *Type*: statement
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
536
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
537 * `validate_bool`: Validate that all passed values are either true or false. Abort catalog compilation if any value fails this check.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
538
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
539 The following values will pass:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
540
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
541 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
542 $iamtrue = true
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
543 validate_bool(true)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
544 validate_bool(true, true, false, $iamtrue)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
545 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
546
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
547 The following values will fail, causing compilation to abort:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
548
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
549 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
550 $some_array = [ true ]
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
551 validate_bool("false")
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
552 validate_bool("true")
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
553 validate_bool($some_array)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
554 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
555
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
556 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
557
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
558 * `validate_cmd`: Performs validation of a string with an external command. The first argument of this function should be the string to test, and the second argument should be the path to a test command taking a file as last argument. If the command, launched against a tempfile containing the passed string, returns a non-null value, compilation aborts with a parse error.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
559
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
560 You can pass a third argument as the error message raised and shown to the user:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
561
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
562 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
563 validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
564 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
565
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
566 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
567
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
568 * `validate_hash`: Validates that all passed values are hash data structures. Abort catalog compilation if any value fails this check.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
569
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
570 The following values will pass:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
571
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
572 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
573 $my_hash = { 'one' => 'two' }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
574 validate_hash($my_hash)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
575 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
576
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
577 The following values will fail, causing compilation to abort:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
578
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
579 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
580 validate_hash(true)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
581 validate_hash('some_string')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
582 $undefined = undef
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
583 validate_hash($undefined)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
584 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
585
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
586 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
587
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
588 * `validate_re`: Performs simple validation of a string against one or more regular expressions. The first argument of this function should be the string to
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
589 test, and the second argument should be a stringified regular expression
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
590 (without the // delimiters) or an array of regular expressions. If none
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
591 of the regular expressions match the string passed in, compilation aborts with a parse error.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
592
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
593 You can pass a third argument as the error message raised and shown to the user.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
594
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
595 The following strings validate against the regular expressions:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
596
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
597 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
598 validate_re('one', '^one$')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
599 validate_re('one', [ '^one', '^two' ])
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
600 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
601
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
602 The following string fails to validate, causing compilation to abort:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
603
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
604 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
605 validate_re('one', [ '^two', '^three' ])
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
606 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
607
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
608 To set the error message:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
609
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
610 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
611 validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
612 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
613
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
614 *Type*: statement
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
615
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
616 * `validate_slength`: Validates that the first argument is a string (or an array of strings), and is less than or equal to the length of the second argument. It fails if the first argument is not a string or array of strings, or if arg 2 is not convertable to a number.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
617
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
618 The following values pass:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
619
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
620 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
621 validate_slength("discombobulate",17)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
622 validate_slength(["discombobulate","moo"],17)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
623 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
624
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
625 The following values fail:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
626
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
627 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
628 validate_slength("discombobulate",1)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
629 validate_slength(["discombobulate","thermometer"],5)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
630 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
631
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
632 *Type*: statement
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
633
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
634 * `validate_string`: Validates that all passed values are string data structures. Aborts catalog compilation if any value fails this check.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
635
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
636 The following values pass:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
637
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
638 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
639 $my_string = "one two"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
640 validate_string($my_string, 'three')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
641 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
642
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
643 The following values fail, causing compilation to abort:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
644
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
645 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
646 validate_string(true)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
647 validate_string([ 'some', 'array' ])
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
648 $undefined = undef
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
649 validate_string($undefined)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
650 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
651
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
652 *Type*: statement
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
653
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
654 * `values`: When given a hash, this function returns the values of that hash.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
655
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
656 *Examples:*
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
657
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
658 ```
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
659 $hash = {
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
660 'a' => 1,
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
661 'b' => 2,
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
662 'c' => 3,
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
663 }
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
664 values($hash)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
665 ```
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
666
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
667 The example above returns [1,2,3].
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
668
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
669 *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
670
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
671 * `values_at`: Finds value inside an array based on location. The first argument is the array you want to analyze, and the second element can be a combination of:
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
672
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
673 * A single numeric index
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
674 * A range in the form of 'start-stop' (eg. 4-9)
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
675 * An array combining the above
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
676
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
677 For example, `values_at(['a','b','c'], 2)` returns ['c']; `values_at(['a','b','c'], ["0-1"])` returns ['a','b']; and `values_at(['a','b','c','d','e'], [0, "2-3"])` returns ['a','c','d'].
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
678
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
679 *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
680
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
681 * `zip`: Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments. For example, `zip(['1','2','3'],['4','5','6'])` results in ["1", "4"], ["2", "5"], ["3", "6"]. *Type*: rvalue
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
682
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
683 ##Limitations
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
684
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
685 As of Puppet Enterprise version 3.7, the stdlib module is no longer included in PE. PE users should install the most recent release of stdlib for compatibility with Puppet modules.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
686
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
687 ###Version Compatibility
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
688
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
689 Versions | Puppet 2.6 | Puppet 2.7 | Puppet 3.x | Puppet 4.x |
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
690 :---------------|:-----:|:---:|:---:|:----:
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
691 **stdlib 2.x** | **yes** | **yes** | no | no
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
692 **stdlib 3.x** | no | **yes** | **yes** | no
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
693 **stdlib 4.x** | no | **yes** | **yes** | no
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
694 **stdlib 5.x** | no | no | **yes** | **yes**
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
695
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
696 **stdlib 5.x**: When released, stdlib 5.x will drop support for Puppet 2.7.x. Please see [this discussion](https://github.com/puppetlabs/puppetlabs-stdlib/pull/176#issuecomment-30251414).
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
697
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
698 ##Development
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
699
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
700 Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
701
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
702 We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
703
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
704 You can read the complete module contribution guide on the [Puppet Labs wiki](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing).
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
705
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
706 To report or research a bug with any part of this module, please go to
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
707 [http://tickets.puppetlabs.com/browse/PUP](http://tickets.puppetlabs.com/browse/PUP).
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
708
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
709 ##Contributors
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
710
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
711 The list of contributors can be found at: https://github.com/puppetlabs/puppetlabs-stdlib/graphs/contributors
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
712
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
713
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
714
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
715