puppet 2.7.14 → 2.7.16

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (111) hide show
  1. data/CHANGELOG +85 -0
  2. data/conf/redhat/puppet.spec +31 -4
  3. data/lib/puppet.rb +1 -1
  4. data/lib/puppet/defaults.rb +2 -3
  5. data/lib/puppet/face/module/install.rb +3 -3
  6. data/lib/puppet/face/module/search.rb +3 -3
  7. data/lib/puppet/indirector/face.rb +1 -1
  8. data/lib/puppet/network/http_pool.rb +17 -8
  9. data/lib/puppet/node/environment.rb +1 -3
  10. data/lib/puppet/parser/ast.rb +1 -1
  11. data/lib/puppet/parser/compiler.rb +2 -10
  12. data/lib/puppet/parser/functions/template.rb +2 -1
  13. data/lib/puppet/parser/lexer.rb +2 -2
  14. data/lib/puppet/parser/scope.rb +3 -2
  15. data/lib/puppet/provider/package/gem.rb +3 -1
  16. data/lib/puppet/provider/package/pkg.rb +18 -2
  17. data/lib/puppet/provider/service/gentoo.rb +5 -0
  18. data/lib/puppet/provider/service/init.rb +12 -14
  19. data/lib/puppet/provider/service/redhat.rb +1 -1
  20. data/lib/puppet/provider/service/upstart.rb +257 -7
  21. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +6 -9
  22. data/lib/puppet/reports/http.rb +1 -1
  23. data/lib/puppet/reports/tagmail.rb +1 -1
  24. data/lib/puppet/type/cron.rb +5 -0
  25. data/lib/puppet/type/filebucket.rb +12 -0
  26. data/lib/puppet/util.rb +15 -9
  27. data/lib/puppet/util/colors.rb +94 -64
  28. data/lib/puppet/util/platform.rb +15 -0
  29. data/man/man5/puppet.conf.5 +73 -27
  30. data/man/man8/filebucket.8 +1 -1
  31. data/man/man8/pi.8 +1 -1
  32. data/man/man8/puppet-agent.8 +17 -17
  33. data/man/man8/puppet-apply.8 +8 -3
  34. data/man/man8/puppet-ca.8 +183 -0
  35. data/man/man8/puppet-catalog.8 +17 -10
  36. data/man/man8/puppet-cert.8 +1 -1
  37. data/man/man8/puppet-certificate.8 +27 -11
  38. data/man/man8/puppet-certificate_request.8 +12 -11
  39. data/man/man8/puppet-certificate_revocation_list.8 +11 -10
  40. data/man/man8/puppet-config.8 +1 -1
  41. data/man/man8/puppet-describe.8 +1 -1
  42. data/man/man8/puppet-device.8 +2 -2
  43. data/man/man8/puppet-doc.8 +15 -3
  44. data/man/man8/puppet-facts.8 +18 -8
  45. data/man/man8/puppet-file.8 +13 -22
  46. data/man/man8/puppet-filebucket.8 +1 -1
  47. data/man/man8/puppet-help.8 +1 -1
  48. data/man/man8/puppet-inspect.8 +10 -2
  49. data/man/man8/puppet-instrumentation_data.8 +145 -0
  50. data/man/man8/puppet-instrumentation_listener.8 +222 -0
  51. data/man/man8/puppet-instrumentation_probe.8 +207 -0
  52. data/man/man8/puppet-key.8 +11 -7
  53. data/man/man8/puppet-kick.8 +35 -3
  54. data/man/man8/puppet-man.8 +1 -1
  55. data/man/man8/puppet-master.8 +1 -1
  56. data/man/man8/puppet-module.8 +451 -0
  57. data/man/man8/puppet-node.8 +64 -22
  58. data/man/man8/puppet-parser.8 +1 -1
  59. data/man/man8/puppet-plugin.8 +1 -1
  60. data/man/man8/puppet-queue.8 +1 -1
  61. data/man/man8/puppet-report.8 +12 -8
  62. data/man/man8/puppet-resource.8 +1 -1
  63. data/man/man8/puppet-resource_type.8 +11 -7
  64. data/man/man8/puppet-secret_agent.8 +1 -1
  65. data/man/man8/puppet-status.8 +11 -7
  66. data/man/man8/puppet.8 +1 -1
  67. data/man/man8/puppetca.8 +1 -1
  68. data/man/man8/puppetd.8 +17 -17
  69. data/man/man8/puppetdoc.8 +15 -3
  70. data/man/man8/puppetmasterd.8 +1 -1
  71. data/man/man8/puppetqd.8 +1 -1
  72. data/man/man8/puppetrun.8 +35 -3
  73. data/man/man8/ralsh.8 +1 -1
  74. data/spec/fixtures/unit/provider/package/gem/line-with-1.8.5-warning +14 -0
  75. data/spec/fixtures/unit/provider/package/pkg/{dummy → dummy_solaris10} +0 -0
  76. data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11 +1 -0
  77. data/spec/fixtures/unit/provider/package/pkg/solaris11 +12 -0
  78. data/spec/fixtures/unit/provider/package/pkg/unknown_status +12 -0
  79. data/spec/fixtures/unit/provider/service/gentoo/rc_update_show +30 -0
  80. data/spec/integration/defaults_spec.rb +2 -7
  81. data/spec/integration/network/server/mongrel_spec.rb +16 -10
  82. data/spec/integration/network/server/webrick_spec.rb +16 -9
  83. data/spec/integration/provider/service/init_spec.rb +20 -4
  84. data/spec/integration/provider/ssh_authorized_key_spec.rb +119 -107
  85. data/spec/unit/face/module/install_spec.rb +16 -4
  86. data/spec/unit/network/http/api/v1_spec.rb +8 -0
  87. data/spec/unit/network/http_pool_spec.rb +80 -74
  88. data/spec/unit/node/environment_spec.rb +9 -4
  89. data/spec/unit/parser/ast/leaf_spec.rb +2 -2
  90. data/spec/unit/parser/ast_spec.rb +3 -3
  91. data/spec/unit/parser/compiler_spec.rb +0 -17
  92. data/spec/unit/parser/lexer_spec.rb +45 -2
  93. data/spec/unit/parser/scope_spec.rb +181 -14
  94. data/spec/unit/provider/package/gem_spec.rb +17 -1
  95. data/spec/unit/provider/package/pkg_spec.rb +70 -22
  96. data/spec/unit/provider/service/gentoo_spec.rb +237 -0
  97. data/spec/unit/provider/service/init_spec.rb +2 -2
  98. data/spec/unit/provider/service/redhat_spec.rb +2 -2
  99. data/spec/unit/provider/service/upstart_spec.rb +414 -5
  100. data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +24 -0
  101. data/spec/unit/reports/tagmail_spec.rb +50 -0
  102. data/spec/unit/type/cron_spec.rb +21 -1
  103. data/spec/unit/type/filebucket_spec.rb +39 -9
  104. data/spec/unit/util/colors_spec.rb +69 -0
  105. data/spec/unit/util/log/destinations_spec.rb +17 -9
  106. data/spec/unit/util/log_spec.rb +2 -1
  107. data/spec/unit/util_spec.rb +11 -0
  108. data/tasks/rake/gem.rake +1 -1
  109. data/tasks/rake/manpages.rake +11 -3
  110. data/test/network/handler/fileserver.rb +7 -1
  111. metadata +22 -10
@@ -0,0 +1,207 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "PUPPET\-INSTRUMENTATION_PROBE" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBpuppet\-instrumentation_probe\fR \- Manage instrumentation probes\.
8
+ .
9
+ .SH "SYNOPSIS"
10
+ puppet instrumentation_probe \fIaction\fR [\-\-terminus TERMINUS] [\-\-extra HASH]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This subcommand enables/disables or list instrumentation listeners\.
14
+ .
15
+ .SH "OPTIONS"
16
+ Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action\. For example, \fBserver\fR is a valid configuration parameter, so you can specify \fB\-\-server <servername>\fR as an argument\.
17
+ .
18
+ .P
19
+ See the configuration file documentation at \fIhttp://docs\.puppetlabs\.com/references/stable/configuration\.html\fR for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \fB\-\-genconfig\fR\.
20
+ .
21
+ .TP
22
+ \-\-mode MODE
23
+ The run mode to use for the current action\. Valid modes are \fBuser\fR, \fBagent\fR, and \fBmaster\fR\.
24
+ .
25
+ .TP
26
+ \-\-render\-as FORMAT
27
+ The format in which to render output\. The most common formats are \fBjson\fR, \fBs\fR (string), \fByaml\fR, and \fBconsole\fR, but other options such as \fBdot\fR are sometimes available\.
28
+ .
29
+ .TP
30
+ \-\-verbose
31
+ Whether to log verbosely\.
32
+ .
33
+ .TP
34
+ \-\-debug
35
+ Whether to log debug information\.
36
+ .
37
+ .TP
38
+ \-\-extra HASH
39
+ A terminus can take additional arguments to refine the operation, which are passed as an arbitrary hash to the back\-end\. Anything passed as the extra value is just send direct to the back\-end\.
40
+ .
41
+ .TP
42
+ \-\-terminus TERMINUS
43
+ Indirector faces expose indirected subsystems of Puppet\. These subsystems are each able to retrieve and alter a specific type of data (with the familiar actions of \fBfind\fR, \fBsearch\fR, \fBsave\fR, and \fBdestroy\fR) from an arbitrary number of pluggable backends\. In Puppet parlance, these backends are called terminuses\.
44
+ .
45
+ .IP
46
+ Almost all indirected subsystems have a \fBrest\fR terminus that interacts with the puppet master\'s data\. Most of them have additional terminuses for various local data models, which are in turn used by the indirected subsystem on the puppet master whenever it receives a remote request\.
47
+ .
48
+ .IP
49
+ The terminus for an action is often determined by context, but occasionally needs to be set explicitly\. See the "Notes" section of this face\'s manpage for more details\.
50
+ .
51
+ .SH "ACTIONS"
52
+ .
53
+ .TP
54
+ \fBdestroy\fR \- API only: disable all instrumentation probes\.
55
+ \fBSYNOPSIS\fR
56
+ .
57
+ .IP
58
+ puppet instrumentation_probe destroy [\-\-terminus TERMINUS] [\-\-extra HASH] \fIdummy\fR
59
+ .
60
+ .IP
61
+ \fBDESCRIPTION\fR
62
+ .
63
+ .IP
64
+ API only: disable all instrumentation probes\.
65
+ .
66
+ .TP
67
+ \fBdisable\fR \- Disable all instrumentation probes\.
68
+ \fBSYNOPSIS\fR
69
+ .
70
+ .IP
71
+ puppet instrumentation_probe disable [\-\-terminus TERMINUS] [\-\-extra HASH] \fIdummy\fR
72
+ .
73
+ .IP
74
+ \fBDESCRIPTION\fR
75
+ .
76
+ .IP
77
+ Disable all instrumentation probes\. After being disabled, no listeners will receive instrumentation notifications\.
78
+ .
79
+ .IP
80
+ \fBRETURNS\fR
81
+ .
82
+ .IP
83
+ Nothing\.
84
+ .
85
+ .TP
86
+ \fBenable\fR \- Enable all instrumentation probes\.
87
+ \fBSYNOPSIS\fR
88
+ .
89
+ .IP
90
+ puppet instrumentation_probe enable [\-\-terminus TERMINUS] [\-\-extra HASH] \fIdummy\fR
91
+ .
92
+ .IP
93
+ \fBDESCRIPTION\fR
94
+ .
95
+ .IP
96
+ Enable all instrumentation probes\. After being enabled, all enabled listeners will start receiving instrumentation notifications from the probes\.
97
+ .
98
+ .IP
99
+ \fBRETURNS\fR
100
+ .
101
+ .IP
102
+ Nothing\.
103
+ .
104
+ .TP
105
+ \fBfind\fR \- Invalid for this subcommand\.
106
+ \fBSYNOPSIS\fR
107
+ .
108
+ .IP
109
+ puppet instrumentation_probe find [\-\-terminus TERMINUS] [\-\-extra HASH] \fIkey\fR
110
+ .
111
+ .IP
112
+ \fBDESCRIPTION\fR
113
+ .
114
+ .IP
115
+ Invalid for this subcommand\.
116
+ .
117
+ .TP
118
+ \fBinfo\fR \- Print the default terminus class for this face\.
119
+ \fBSYNOPSIS\fR
120
+ .
121
+ .IP
122
+ puppet instrumentation_probe info [\-\-terminus TERMINUS] [\-\-extra HASH]
123
+ .
124
+ .IP
125
+ \fBDESCRIPTION\fR
126
+ .
127
+ .IP
128
+ Prints the default terminus class for this subcommand\. Note that different run modes may have different default termini; when in doubt, specify the run mode with the \'\-\-mode\' option\.
129
+ .
130
+ .TP
131
+ \fBsave\fR \- API only: enable all instrumentation probes\.
132
+ \fBSYNOPSIS\fR
133
+ .
134
+ .IP
135
+ puppet instrumentation_probe save [\-\-terminus TERMINUS] [\-\-extra HASH] \fIdummy\fR
136
+ .
137
+ .IP
138
+ \fBDESCRIPTION\fR
139
+ .
140
+ .IP
141
+ API only: create or overwrite an object\. As the Faces framework does not currently accept data from STDIN, save actions cannot currently be invoked from the command line\.
142
+ .
143
+ .TP
144
+ \fBsearch\fR \- Retrieve all probe statuses\.
145
+ \fBSYNOPSIS\fR
146
+ .
147
+ .IP
148
+ puppet instrumentation_probe search [\-\-terminus TERMINUS] [\-\-extra HASH] \fIdummy_text\fR
149
+ .
150
+ .IP
151
+ \fBDESCRIPTION\fR
152
+ .
153
+ .IP
154
+ Retrieve all probe statuses\.
155
+ .
156
+ .IP
157
+ \fBRETURNS\fR
158
+ .
159
+ .IP
160
+ The statuses of all instrumentation probes
161
+ .
162
+ .IP
163
+ \fBNOTES\fR
164
+ .
165
+ .IP
166
+ Although this action always returns all instrumentation probes, it requires a dummy search key; this is a known bug\.
167
+ .
168
+ .SH "EXAMPLES"
169
+ \fBdisable\fR
170
+ .
171
+ .P
172
+ Disable the probes for the running master:
173
+ .
174
+ .P
175
+ $ puppet instrumentation_probe disable x \-\-terminus rest
176
+ .
177
+ .P
178
+ \fBenable\fR
179
+ .
180
+ .P
181
+ Enable the probes for the running master:
182
+ .
183
+ .P
184
+ $ puppet instrumentation_probe enable x \-\-terminus rest
185
+ .
186
+ .P
187
+ \fBsearch\fR
188
+ .
189
+ .P
190
+ Retrieve the state of the probes running in the remote puppet master:
191
+ .
192
+ .P
193
+ $ puppet instrumentation_probe search x \-\-terminus rest
194
+ .
195
+ .SH "NOTES"
196
+ This subcommand is an indirector face, which exposes \fBfind\fR, \fBsearch\fR, \fBsave\fR, and \fBdestroy\fR actions for an indirected subsystem of Puppet\. Valid termini for this face include:
197
+ .
198
+ .IP "\(bu" 4
199
+ \fBlocal\fR
200
+ .
201
+ .IP "\(bu" 4
202
+ \fBrest\fR
203
+ .
204
+ .IP "" 0
205
+ .
206
+ .SH "COPYRIGHT AND LICENSE"
207
+ Copyright 2011 by Puppet Labs Apache 2 license; see COPYING
@@ -1,13 +1,13 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-KEY" "8" "June 2011" "Puppet Labs, LLC" "Puppet manual"
4
+ .TH "PUPPET\-KEY" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-key\fR \- Create, save, and remove certificate keys\.
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- puppet key \fIaction\fR [\-\-terminus TERMINUS]
10
+ puppet key \fIaction\fR [\-\-terminus TERMINUS] [\-\-extra HASH]
11
11
  .
12
12
  .SH "DESCRIPTION"
13
13
  This subcommand manages certificate private keys\. Keys are created automatically by puppet agent and when certificate requests are generated with \'puppet certificate generate\'; it should not be necessary to use this subcommand directly\.
@@ -35,6 +35,10 @@ Whether to log verbosely\.
35
35
  Whether to log debug information\.
36
36
  .
37
37
  .TP
38
+ \-\-extra HASH
39
+ A terminus can take additional arguments to refine the operation, which are passed as an arbitrary hash to the back\-end\. Anything passed as the extra value is just send direct to the back\-end\.
40
+ .
41
+ .TP
38
42
  \-\-terminus TERMINUS
39
43
  Indirector faces expose indirected subsystems of Puppet\. These subsystems are each able to retrieve and alter a specific type of data (with the familiar actions of \fBfind\fR, \fBsearch\fR, \fBsave\fR, and \fBdestroy\fR) from an arbitrary number of pluggable backends\. In Puppet parlance, these backends are called terminuses\.
40
44
  .
@@ -51,7 +55,7 @@ The terminus for an action is often determined by context, but occasionally need
51
55
  \fBSYNOPSIS\fR
52
56
  .
53
57
  .IP
54
- puppet key destroy [\-\-terminus TERMINUS] \fIkey\fR
58
+ puppet key destroy [\-\-terminus TERMINUS] [\-\-extra HASH] \fIkey\fR
55
59
  .
56
60
  .IP
57
61
  \fBDESCRIPTION\fR
@@ -64,7 +68,7 @@ Delete an object\.
64
68
  \fBSYNOPSIS\fR
65
69
  .
66
70
  .IP
67
- puppet key find [\-\-terminus TERMINUS] \fIkey\fR
71
+ puppet key find [\-\-terminus TERMINUS] [\-\-extra HASH] \fIkey\fR
68
72
  .
69
73
  .IP
70
74
  \fBDESCRIPTION\fR
@@ -77,7 +81,7 @@ Retrieve an object by name\.
77
81
  \fBSYNOPSIS\fR
78
82
  .
79
83
  .IP
80
- puppet key info [\-\-terminus TERMINUS]
84
+ puppet key info [\-\-terminus TERMINUS] [\-\-extra HASH]
81
85
  .
82
86
  .IP
83
87
  \fBDESCRIPTION\fR
@@ -90,7 +94,7 @@ Prints the default terminus class for this subcommand\. Note that different run
90
94
  \fBSYNOPSIS\fR
91
95
  .
92
96
  .IP
93
- puppet key save [\-\-terminus TERMINUS]
97
+ puppet key save [\-\-terminus TERMINUS] [\-\-extra HASH] \fIkey\fR
94
98
  .
95
99
  .IP
96
100
  \fBDESCRIPTION\fR
@@ -103,7 +107,7 @@ API only: create or overwrite an object\. As the Faces framework does not curren
103
107
  \fBSYNOPSIS\fR
104
108
  .
105
109
  .IP
106
- puppet key search [\-\-terminus TERMINUS] \fIquery\fR
110
+ puppet key search [\-\-terminus TERMINUS] [\-\-extra HASH] \fIquery\fR
107
111
  .
108
112
  .IP
109
113
  \fBDESCRIPTION\fR
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-KICK" "8" "June 2011" "Puppet Labs, LLC" "Puppet manual"
4
+ .TH "PUPPET\-KICK" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-kick\fR \- Remotely control puppet agent
@@ -25,10 +25,42 @@ You will most likely have to run \'puppet kick\' as root to get access to the SS
25
25
  \'puppet kick\' reads \'puppet master\'\'s configuration file, so that it can copy things like LDAP settings\.
26
26
  .
27
27
  .SH "USAGE NOTES"
28
- Puppet kick is useless unless puppet agent is listening for incoming connections and allowing access to the \fBrun\fR endpoint\. This entails starting the agent with \fBlisten = true\fR in its puppet\.conf file, and allowing access to the \fB/run\fR path in its auth\.conf file; see \fBhttp://docs\.puppetlabs\.com/guides/rest_auth_conf\.html\fR for more details\.
28
+ Puppet kick needs the puppet agent on the target machine to be running as a daemon, be configured to listen for incoming network connections, and have an appropriate security configuration\.
29
29
  .
30
30
  .P
31
- Additionally, due to a known bug, you must make sure a namespaceauth\.conf file exists in puppet agent\'s $confdir\. This file will not be consulted, and may be left empty\.
31
+ The specific changes required are:
32
+ .
33
+ .IP "\(bu" 4
34
+ Set \fBlisten = true\fR in the agent\'s \fBpuppet\.conf\fR file (or \fB\-\-listen\fR on the command line)
35
+ .
36
+ .IP "\(bu" 4
37
+ Configure the node\'s firewall to allow incoming connections on port 8139
38
+ .
39
+ .IP "\(bu" 4
40
+ Insert the following stanza at the top of the node\'s \fBauth\.conf\fR file:
41
+ .
42
+ .IP "" 4
43
+ .
44
+ .nf
45
+
46
+ # Allow puppet kick access
47
+ path /run
48
+ method save
49
+ auth any
50
+ allow workstation\.example\.com
51
+ .
52
+ .fi
53
+ .
54
+ .IP "" 0
55
+
56
+ .
57
+ .IP "" 0
58
+ .
59
+ .P
60
+ This example would allow the machine \fBworkstation\.example\.com\fR to trigger a Puppet run; adjust the "allow" directive to suit your site\. You may also use \fBallow *\fR to allow anyone to trigger a Puppet run, but that makes it possible to interfere with your site by triggering excessive Puppet runs\.
61
+ .
62
+ .P
63
+ See \fBhttp://docs\.puppetlabs\.com/guides/rest_auth_conf\.html\fR for more details about security settings\.
32
64
  .
33
65
  .SH "OPTIONS"
34
66
  Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MAN" "8" "June 2011" "Puppet Labs, LLC" "Puppet manual"
4
+ .TH "PUPPET\-MAN" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-man\fR \- Display Puppet manual pages\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MASTER" "8" "June 2011" "Puppet Labs, LLC" "Puppet manual"
4
+ .TH "PUPPET\-MASTER" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-master\fR \- The puppet master daemon
@@ -0,0 +1,451 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "PUPPET\-MODULE" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.
8
+ .
9
+ .SH "SYNOPSIS"
10
+ puppet module \fIaction\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This subcommand can find, install, and manage modules from the Puppet Forge, a repository of user\-contributed Puppet code\. It can also generate empty modules, and prepare locally developed modules for release on the Forge\.
14
+ .
15
+ .SH "OPTIONS"
16
+ Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action\. For example, \fBserver\fR is a valid configuration parameter, so you can specify \fB\-\-server <servername>\fR as an argument\.
17
+ .
18
+ .P
19
+ See the configuration file documentation at \fIhttp://docs\.puppetlabs\.com/references/stable/configuration\.html\fR for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \fB\-\-genconfig\fR\.
20
+ .
21
+ .TP
22
+ \-\-mode MODE
23
+ The run mode to use for the current action\. Valid modes are \fBuser\fR, \fBagent\fR, and \fBmaster\fR\.
24
+ .
25
+ .TP
26
+ \-\-render\-as FORMAT
27
+ The format in which to render output\. The most common formats are \fBjson\fR, \fBs\fR (string), \fByaml\fR, and \fBconsole\fR, but other options such as \fBdot\fR are sometimes available\.
28
+ .
29
+ .TP
30
+ \-\-verbose
31
+ Whether to log verbosely\.
32
+ .
33
+ .TP
34
+ \-\-debug
35
+ Whether to log debug information\.
36
+ .
37
+ .SH "ACTIONS"
38
+ .
39
+ .TP
40
+ \fBbuild\fR \- Build a module release package\.
41
+ \fBSYNOPSIS\fR
42
+ .
43
+ .IP
44
+ puppet module build \fIpath\fR
45
+ .
46
+ .IP
47
+ \fBDESCRIPTION\fR
48
+ .
49
+ .IP
50
+ Prepares a local module for release on the Puppet Forge by building a ready\-to\-upload archive file\.
51
+ .
52
+ .IP
53
+ This action uses the Modulefile in the module directory to set metadata used by the Forge\. See \fIhttp://links\.puppetlabs\.com/modulefile\fR for more about writing modulefiles\.
54
+ .
55
+ .IP
56
+ After being built, the release archive file can be found in the module\'s \fBpkg\fR directory\.
57
+ .
58
+ .IP
59
+ \fBRETURNS\fR
60
+ .
61
+ .IP
62
+ Pathname object representing the path to the release archive\.
63
+ .
64
+ .TP
65
+ \fBchanges\fR \- Show modified files of an installed module\.
66
+ \fBSYNOPSIS\fR
67
+ .
68
+ .IP
69
+ puppet module changes \fIpath\fR
70
+ .
71
+ .IP
72
+ \fBDESCRIPTION\fR
73
+ .
74
+ .IP
75
+ Shows any files in a module that have been modified since it was installed\. This action compares the files on disk to the md5 checksums included in the module\'s metadata\.
76
+ .
77
+ .IP
78
+ \fBRETURNS\fR
79
+ .
80
+ .IP
81
+ Array of strings representing paths of modified files\.
82
+ .
83
+ .TP
84
+ \fBgenerate\fR \- Generate boilerplate for a new module\.
85
+ \fBSYNOPSIS\fR
86
+ .
87
+ .IP
88
+ puppet module generate \fIname\fR
89
+ .
90
+ .IP
91
+ \fBDESCRIPTION\fR
92
+ .
93
+ .IP
94
+ Generates boilerplate for a new module by creating the directory structure and files recommended for the Puppet community\'s best practices\.
95
+ .
96
+ .IP
97
+ A module may need additional directories beyond this boilerplate if it provides plugins, files, or templates\.
98
+ .
99
+ .IP
100
+ \fBRETURNS\fR
101
+ .
102
+ .IP
103
+ Array of Pathname objects representing paths of generated files\.
104
+ .
105
+ .TP
106
+ \fBinstall\fR \- Install a module from the Puppet Forge or a release archive\.
107
+ \fBSYNOPSIS\fR
108
+ .
109
+ .IP
110
+ puppet module install [\-\-force | \-f] [\-\-target\-dir DIR | \-i DIR] [\-\-ignore\-dependencies] [\-\-modulepath MODULEPATH] [\-\-version VER | \-v VER] [\-\-environment NAME] \fIname\fR
111
+ .
112
+ .IP
113
+ \fBDESCRIPTION\fR
114
+ .
115
+ .IP
116
+ Installs a module from the Puppet Forge or from a release archive file\.
117
+ .
118
+ .IP
119
+ The specified module will be installed into the directory specified with the \fB\-\-target\-dir\fR option, which defaults to /Users/matthaus/\.puppet/modules\.
120
+ .
121
+ .IP
122
+ \fBOPTIONS\fR
123
+ .
124
+ .IP
125
+ \fI\-\-environment NAME\fR \- The target environment to install modules into\. Only applicable if multiple environments (with different modulepaths) have been configured in puppet\.conf\.
126
+ .
127
+ .IP
128
+ \fI\-\-force\fR | \fI\-f\fR \- Force overwrite of existing module, if any\.
129
+ .
130
+ .IP
131
+ \fI\-\-ignore\-dependencies\fR \- Do not attempt to install dependencies\.
132
+ .
133
+ .IP
134
+ \fI\-\-modulepath MODULEPATH\fR \- The list of directories to check for modules\. When installing a new module, this setting determines where the module tool will look for its dependencies\. If the \fB\-\-target dir\fR option is not specified, the first directory in the modulepath will also be used as the install directory\.
135
+ .
136
+ .IP
137
+ When installing a module into an environment whose modulepath is specified in puppet\.conf, you can use the \fB\-\-environment\fR option instead, and its modulepath will be used automatically\.
138
+ .
139
+ .IP
140
+ This setting should be a list of directories separated by the path separator character\. (The path separator is \fB:\fR on Unix\-like platforms and \fB;\fR on Windows\.)
141
+ .
142
+ .IP
143
+ \fI\-\-target\-dir DIR\fR | \fI\-i DIR\fR \- The directory into which modules are installed; defaults to the first directory in the modulepath\.
144
+ .
145
+ .IP
146
+ Specifying this option will change the installation directory, and will use the existing modulepath when checking for dependencies\. If you wish to check a different set of directories for dependencies, you must also use the \fB\-\-environment\fR or \fB\-\-modulepath\fR options\.
147
+ .
148
+ .IP
149
+ \fI\-\-version VER\fR | \fI\-v VER\fR \- Module version to install; can be an exact version or a requirement string, eg \'>= 1\.0\.3\'\. Defaults to latest version\.
150
+ .
151
+ .IP
152
+ \fBRETURNS\fR
153
+ .
154
+ .IP
155
+ Pathname object representing the path to the installed module\.
156
+ .
157
+ .TP
158
+ \fBlist\fR \- List installed modules
159
+ \fBSYNOPSIS\fR
160
+ .
161
+ .IP
162
+ puppet module list [\-\-environment NAME] [\-\-modulepath MODULEPATH] [\-\-tree]
163
+ .
164
+ .IP
165
+ \fBDESCRIPTION\fR
166
+ .
167
+ .IP
168
+ Lists the installed puppet modules\. By default, this action scans the modulepath from puppet\.conf\'s \fB[main]\fR block; use the \-\-modulepath option to change which directories are scanned\.
169
+ .
170
+ .IP
171
+ The output of this action includes information from the module\'s metadata, including version numbers and unmet module dependencies\.
172
+ .
173
+ .IP
174
+ \fBOPTIONS\fR
175
+ .
176
+ .IP
177
+ \fI\-\-environment NAME\fR \- Which environments\' modules to list\.
178
+ .
179
+ .IP
180
+ \fI\-\-modulepath MODULEPATH\fR \- Which directories to look for modules in; use the system path separator character (\fB:\fR on Unix\-like systems and \fB;\fR on Windows) to specify multiple directories\.
181
+ .
182
+ .IP
183
+ \fI\-\-tree\fR \- Whether to show dependencies as a tree view
184
+ .
185
+ .IP
186
+ \fBRETURNS\fR
187
+ .
188
+ .IP
189
+ hash of paths to module objects
190
+ .
191
+ .TP
192
+ \fBsearch\fR \- Search the Puppet Forge for a module\.
193
+ \fBSYNOPSIS\fR
194
+ .
195
+ .IP
196
+ puppet module search \fIsearch_term\fR
197
+ .
198
+ .IP
199
+ \fBDESCRIPTION\fR
200
+ .
201
+ .IP
202
+ Searches the Puppet Forge for modules whose names, descriptions, or keywords match the provided search term\.
203
+ .
204
+ .IP
205
+ \fBRETURNS\fR
206
+ .
207
+ .IP
208
+ Array of module metadata hashes
209
+ .
210
+ .TP
211
+ \fBuninstall\fR \- Uninstall a puppet module\.
212
+ \fBSYNOPSIS\fR
213
+ .
214
+ .IP
215
+ puppet module uninstall [\-\-force | \-f] [\-\-environment NAME] [\-\-version=] [\-\-modulepath=] \fIname\fR
216
+ .
217
+ .IP
218
+ \fBDESCRIPTION\fR
219
+ .
220
+ .IP
221
+ Uninstalls a puppet module from the modulepath (or a specific target directory)\.
222
+ .
223
+ .IP
224
+ \fBOPTIONS\fR
225
+ .
226
+ .IP
227
+ \fI\-\-environment NAME\fR \- The target environment to uninstall modules from\.
228
+ .
229
+ .IP
230
+ \fI\-\-force\fR | \fI\-f\fR \- Force the uninstall of an installed module even if there are local changes or the possibility of causing broken dependencies\.
231
+ .
232
+ .IP
233
+ \fI\-\-modulepath=\fR \- The target directory to search for modules\.
234
+ .
235
+ .IP
236
+ \fI\-\-version=\fR \- The version of the module to uninstall\. When using this option, a module matching the specified version must be installed or else an error is raised\.
237
+ .
238
+ .IP
239
+ \fBRETURNS\fR
240
+ .
241
+ .IP
242
+ Hash of module objects representing uninstalled modules and related errors\.
243
+ .
244
+ .TP
245
+ \fBupgrade\fR \- Upgrade a puppet module\.
246
+ \fBSYNOPSIS\fR
247
+ .
248
+ .IP
249
+ puppet module upgrade [\-\-force | \-f] [\-\-ignore\-dependencies] [\-\-environment NAME] [\-\-version=] \fIname\fR
250
+ .
251
+ .IP
252
+ \fBDESCRIPTION\fR
253
+ .
254
+ .IP
255
+ Upgrades a puppet module\.
256
+ .
257
+ .IP
258
+ \fBOPTIONS\fR
259
+ .
260
+ .IP
261
+ \fI\-\-environment NAME\fR \- The target environment to search for modules\.
262
+ .
263
+ .IP
264
+ \fI\-\-force\fR | \fI\-f\fR \- Force the upgrade of an installed module even if there are local changes or the possibility of causing broken dependencies\.
265
+ .
266
+ .IP
267
+ \fI\-\-ignore\-dependencies\fR \- Do not attempt to install dependencies
268
+ .
269
+ .IP
270
+ \fI\-\-version=\fR \- The version of the module to upgrade to\.
271
+ .
272
+ .IP
273
+ \fBRETURNS\fR
274
+ .
275
+ .IP
276
+ Hash
277
+ .
278
+ .SH "EXAMPLES"
279
+ \fBbuild\fR
280
+ .
281
+ .P
282
+ Build a module release:
283
+ .
284
+ .P
285
+ $ puppet module build puppetlabs\-apache notice: Building /Users/kelseyhightower/puppetlabs\-apache for release puppetlabs\-apache/pkg/puppetlabs\-apache\-0\.0\.1\.tar\.gz
286
+ .
287
+ .P
288
+ \fBchanges\fR
289
+ .
290
+ .P
291
+ Show modified files of an installed module:
292
+ .
293
+ .P
294
+ $ puppet module changes /etc/puppet/modules/vcsrepo/ warning: 1 files modified lib/puppet/provider/vcsrepo\.rb
295
+ .
296
+ .P
297
+ \fBgenerate\fR
298
+ .
299
+ .P
300
+ Generate a new module in the current directory:
301
+ .
302
+ .P
303
+ $ puppet module generate puppetlabs\-ssh notice: Generating module at /Users/kelseyhightower/puppetlabs\-ssh puppetlabs\-ssh puppetlabs\-ssh/tests puppetlabs\-ssh/tests/init\.pp puppetlabs\-ssh/spec puppetlabs\-ssh/spec/spec_helper\.rb puppetlabs\-ssh/spec/spec\.opts puppetlabs\-ssh/README puppetlabs\-ssh/Modulefile puppetlabs\-ssh/metadata\.json puppetlabs\-ssh/manifests puppetlabs\-ssh/manifests/init\.pp
304
+ .
305
+ .P
306
+ \fBinstall\fR
307
+ .
308
+ .P
309
+ Install a module:
310
+ .
311
+ .P
312
+ $ puppet module install puppetlabs\-vcsrepo Preparing to install into /etc/puppet/modules \.\.\. Downloading from http://forge\.puppetlabs\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
313
+ .
314
+ .P
315
+ Install a module to a specific environment:
316
+ .
317
+ .P
318
+ $ puppet module install puppetlabs\-vcsrepo \-\-environment development Preparing to install into /etc/puppet/environments/development/modules \.\.\. Downloading from http://forge\.puppetlabs\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppet/environments/development/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
319
+ .
320
+ .P
321
+ Install a specific module version:
322
+ .
323
+ .P
324
+ $ puppet module install puppetlabs\-vcsrepo \-v 0\.0\.4 Preparing to install into /etc/puppet/modules \.\.\. Downloading from http://forge\.puppetlabs\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
325
+ .
326
+ .P
327
+ Install a module into a specific directory:
328
+ .
329
+ .P
330
+ $ puppet module install puppetlabs\-vcsrepo \-\-target\-dir=/usr/share/puppet/modules Preparing to install into /usr/share/puppet/modules \.\.\. Downloading from http://forge\.puppetlabs\.com \.\.\. Installing \-\- do not interrupt \.\.\. /usr/share/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
331
+ .
332
+ .P
333
+ Install a module into a specific directory and check for dependencies in other directories:
334
+ .
335
+ .P
336
+ $ puppet module install puppetlabs\-vcsrepo \-\-target\-dir=/usr/share/puppet/modules \-\-modulepath /etc/puppet/modules Preparing to install into /usr/share/puppet/modules \.\.\. Downloading from http://forge\.puppetlabs\.com \.\.\. Installing \-\- do not interrupt \.\.\. /usr/share/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
337
+ .
338
+ .P
339
+ Install a module from a release archive:
340
+ .
341
+ .P
342
+ $ puppet module install puppetlabs\-vcsrepo\-0\.0\.4\.tar\.gz Preparing to install into /etc/puppet/modules \.\.\. Downloading from http://forge\.puppetlabs\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
343
+ .
344
+ .P
345
+ Install a module from a release archive and ignore dependencies:
346
+ .
347
+ .P
348
+ $ puppet module install puppetlabs\-vcsrepo\-0\.0\.4\.tar\.gz \-\-ignore\-dependencies Preparing to install into /etc/puppet/modules \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
349
+ .
350
+ .P
351
+ \fBlist\fR
352
+ .
353
+ .P
354
+ List installed modules:
355
+ .
356
+ .P
357
+ $ puppet module list /etc/puppet/modules ├── bodepd\-create_resources (v0\.0\.1) ├── puppetlabs\-bacula (v0\.0\.2) ├── puppetlabs\-mysql (v0\.0\.1) ├── puppetlabs\-sqlite (v0\.0\.1) └── puppetlabs\-stdlib (v2\.2\.1) /usr/share/puppet/modules (no modules installed)
358
+ .
359
+ .P
360
+ List installed modules in a tree view:
361
+ .
362
+ .P
363
+ $ puppet module list \-\-tree /etc/puppet/modules └─┬ puppetlabs\-bacula (v0\.0\.2)
364
+ .
365
+ .IP "" 4
366
+ .
367
+ .nf
368
+
369
+ ├── puppetlabs\-stdlib (v2\.2\.1)
370
+ ├─┬ puppetlabs\-mysql (v0\.0\.1)
371
+ │ └── bodepd\-create_resources (v0\.0\.1)
372
+ └── puppetlabs\-sqlite (v0\.0\.1)
373
+ .
374
+ .fi
375
+ .
376
+ .IP "" 0
377
+ .
378
+ .P
379
+ /usr/share/puppet/modules (no modules installed)
380
+ .
381
+ .P
382
+ List installed modules from a specified environment:
383
+ .
384
+ .P
385
+ $ puppet module list \-\-environment production /etc/puppet/modules ├── bodepd\-create_resources (v0\.0\.1) ├── puppetlabs\-bacula (v0\.0\.2) ├── puppetlabs\-mysql (v0\.0\.1) ├── puppetlabs\-sqlite (v0\.0\.1) └── puppetlabs\-stdlib (v2\.2\.1) /usr/share/puppet/modules (no modules installed)
386
+ .
387
+ .P
388
+ List installed modules from a specified modulepath:
389
+ .
390
+ .P
391
+ $ puppet module list \-\-modulepath /usr/share/puppet/modules /usr/share/puppet/modules (no modules installed)
392
+ .
393
+ .P
394
+ \fBsearch\fR
395
+ .
396
+ .P
397
+ Search the Puppet Forge for a module:
398
+ .
399
+ .P
400
+ $ puppet module search puppetlabs NAME DESCRIPTION AUTHOR KEYWORDS bacula This is a generic Apache module @puppetlabs backups
401
+ .
402
+ .P
403
+ \fBuninstall\fR
404
+ .
405
+ .P
406
+ Uninstall a module:
407
+ .
408
+ .P
409
+ $ puppet module uninstall puppetlabs\-ssh Removed /etc/puppet/modules/ssh (v1\.0\.0)
410
+ .
411
+ .P
412
+ Uninstall a module from a specific directory:
413
+ .
414
+ .P
415
+ $ puppet module uninstall puppetlabs\-ssh \-\-modulepath /usr/share/puppet/modules Removed /usr/share/puppet/modules/ssh (v1\.0\.0)
416
+ .
417
+ .P
418
+ Uninstall a module from a specific environment:
419
+ .
420
+ .P
421
+ $ puppet module uninstall puppetlabs\-ssh \-\-environment development Removed /etc/puppet/environments/development/modules/ssh (v1\.0\.0)
422
+ .
423
+ .P
424
+ Uninstall a specific version of a module:
425
+ .
426
+ .P
427
+ $ puppet module uninstall puppetlabs\-ssh \-\-version 2\.0\.0 Removed /etc/puppet/modules/ssh (v2\.0\.0)
428
+ .
429
+ .P
430
+ \fBupgrade\fR
431
+ .
432
+ .P
433
+ upgrade an installed module to the latest version
434
+ .
435
+ .P
436
+ $ puppet module upgrade puppetlabs\-apache /etc/puppet/modules └── puppetlabs\-apache (v1\.0\.0 \-> v2\.4\.0)
437
+ .
438
+ .P
439
+ upgrade an installed module to a specific version
440
+ .
441
+ .P
442
+ $ puppet module upgrade puppetlabs\-apache \-\-version 2\.1\.0 /etc/puppet/modules └── puppetlabs\-apache (v1\.0\.0 \-> v2\.1\.0)
443
+ .
444
+ .P
445
+ upgrade an installed module for a specific environment
446
+ .
447
+ .P
448
+ $ puppet module upgrade puppetlabs\-apache \-\-environment test /usr/share/puppet/environments/test/modules └── puppetlabs\-apache (v1\.0\.0 \-> v2\.4\.0)
449
+ .
450
+ .SH "COPYRIGHT AND LICENSE"
451
+ Copyright 2012 by Puppet Labs Apache 2 license; see COPYING