You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-5
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
1.[Development - Guide for contributing to the module](#development)
16
16
1.[Contributors](#contributors)
17
17
18
-
18
+
<aid="module-description"></a>
19
19
## Module Description
20
20
21
21
This module provides a standard library of resources for Puppet modules. Puppet modules make heavy use of this standard library. The stdlib module adds the following resources to Puppet:
@@ -29,12 +29,14 @@ This module provides a standard library of resources for Puppet modules. Puppet
29
29
30
30
> *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.
31
31
32
+
<aid="setup"></a>
32
33
## Setup
33
34
34
35
[Install](https://puppet.com/docs/puppet/latest/modules_installing.html) the stdlib module to add the functions, facts, and resources of this standard library to Puppet.
35
36
36
37
If you are authoring a module that depends on stdlib, be sure to [specify dependencies](https://puppet.com/docs/puppet/latest/modules_metadata.html#specifying-dependencies-in-modules) in your metadata.json.
37
38
39
+
<aid="usage"></a>
38
40
## Usage
39
41
40
42
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`.
@@ -61,6 +63,7 @@ node default {
61
63
}
62
64
```
63
65
66
+
<aid="reference"></a>
64
67
## Reference
65
68
66
69
*[Public classes](#public-classes)
@@ -70,16 +73,20 @@ node default {
70
73
*[Facts](#facts)
71
74
*[Functions](#functions)
72
75
76
+
<aid="classes"></a>
73
77
### Classes
74
78
79
+
<aid="public-classes"></a>
75
80
#### Public classes
76
81
77
82
The `stdlib` class has no parameters.
78
83
84
+
<aid="private-classes"></a>
79
85
#### Private classes
80
86
81
87
*`stdlib::stages`: Manages a standard set of run stages for Puppet.
82
88
89
+
<aid="defined-types"></a>
83
90
### Defined types
84
91
85
92
#### `file_line`
@@ -197,7 +204,9 @@ Values: String specifying a valid Ruby character encoding.
197
204
198
205
Default: 'UTF-8'.
199
206
200
-
##### `ensure`: Specifies whether the resource is present.
207
+
##### `ensure`
208
+
209
+
Specifies whether the resource is present.
201
210
202
211
Values: 'present', 'absent'.
203
212
@@ -269,6 +278,7 @@ Replaces all lines matched by `match` parameter, even if `line` already exists i
269
278
270
279
Default value: `false`.
271
280
281
+
<aid="data-types"></a>
272
282
### Data types
273
283
274
284
#### `Stdlib::Absolutepath`
@@ -655,6 +665,7 @@ Match an IPv6 address formatted in the "alternative form" allowing for represent
655
665
656
666
Match an IPv6 address which may contain `::` used to compress zeros as documented in section 2.2.2 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt). It will only match addresses without an address prefix as documented in section 2.3 of [RFC 2373](https://www.ietf.org/rfc/rfc2373.txt).
657
667
668
+
<a id="facts"></a>
658
669
### Facts
659
670
660
671
#### `package_provider`
@@ -703,6 +714,7 @@ Determines the root home directory, which depends on your operating system. Gene
703
714
704
715
Returns the default provider Puppet uses to manage services on this system
705
716
717
+
<a id="functions"></a>
706
718
### Functions
707
719
708
720
#### `abs`
@@ -1074,8 +1086,7 @@ Deletes all instances of a given element from an array or hash that match a prov
1074
1086
1075
1087
*Note:* This functionis an implementation of a Ruby class and might not be UTF8 compatible. To ensure compatibility, use this functionwith Ruby 2.4.0 or greater.
When a module's metadata file is absent, the catalog compilation fails. To avoid this failure:
1913
+
When a module's metadata file is absent, the catalog compilation fails. To avoid this failure, do the following:
1903
1914
1904
1915
```
1905
1916
$metadata = load_module_metadata('mysql', true)
@@ -3107,19 +3118,22 @@ A negative value is taken to be "from the end" of the array, for example:
3107
3118
3108
3119
Takes one element from first array given and merges corresponding elements from second array given. 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.
3109
3120
3121
+
<a id="limitations"></a>
3110
3122
## Limitations
3111
3123
3112
3124
As of Puppet Enterprise 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.
3113
3125
3114
3126
For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/metadata.json)
3115
3127
3128
+
<a id="development"></a>
3116
3129
## Development
3117
3130
3118
3131
Puppet 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 hardware, software, and deployment configurations that Puppet is intended to serve. 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. For more information, see our [module contribution guide](https://docs.puppet.com/forge/contributing.html).
3119
3132
3120
3133
To report or research a bug with any part of this module, please go to
The list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-stdlib/graphs/contributors](https://github.com/puppetlabs/puppetlabs-stdlib/graphs/contributors).
0 commit comments