@@ -85,146 +85,146 @@ def summary
85
85
end
86
86
87
87
def help
88
- <<~HELP
89
-
90
- puppet-device(8) -- #{ summary }
91
- ========
92
-
93
- SYNOPSIS
94
- --------
95
- Retrieves catalogs from the Puppet master and applies them to remote devices.
96
-
97
- This subcommand can be run manually; or periodically using cron,
98
- a scheduled task, or a similar tool.
99
-
100
-
101
- USAGE
102
- -----
103
- puppet device [-h|--help] [-v|--verbose] [-d|--debug]
104
- [-l|--logdest syslog|<file>|console] [--detailed-exitcodes]
105
- [--deviceconfig <file>] [-w|--waitforcert <seconds>]
106
- [--libdir <directory>]
107
- [-a|--apply <file>] [-f|--facts] [-r|--resource <type> [name]]
108
- [-t|--target <device>] [--user=<user>] [-V|--version]
109
-
110
-
111
- DESCRIPTION
112
- -----------
113
- Devices require a proxy Puppet agent to request certificates, collect facts,
114
- retrieve and apply catalogs, and store reports.
115
-
116
-
117
- USAGE NOTES
118
- -----------
119
- Devices managed by the puppet-device subcommand on a Puppet agent are
120
- configured in device.conf, which is located at $confdir/device.conf by default,
121
- and is configurable with the $deviceconfig setting.
122
-
123
- The device.conf file is an INI-like file, with one section per device:
124
-
125
- [<DEVICE_CERTNAME>]
126
- type <TYPE>
127
- url <URL>
128
- debug
129
-
130
- The section name specifies the certname of the device.
131
-
132
- The values for the type and url properties are specific to each type of device.
133
-
134
- The optional debug property specifies transport-level debugging,
135
- and is limited to telnet and ssh transports.
136
-
137
- See https://puppet.com/docs/puppet/latest/config_file_device.html for details.
138
-
139
-
140
- OPTIONS
141
- -------
142
- Note that any setting that's valid in the configuration file is also a valid
143
- long argument. For example, 'server' is a valid configuration parameter, so
144
- you can specify '--server <servername>' as an argument.
145
-
146
- * --help, -h:
147
- Print this help message
148
-
149
- * --verbose, -v:
150
- Turn on verbose reporting.
151
-
152
- * --debug, -d:
153
- Enable full debugging.
154
-
155
- * --logdest, -l:
156
- Where to send log messages. Choose between 'syslog' (the POSIX syslog
157
- service), 'console', or the path to a log file. If debugging or verbosity is
158
- enabled, this defaults to 'console'. Otherwise, it defaults to 'syslog'.
159
- Multiple destinations can be set using a comma separated list
160
- (eg: `/path/file1,console,/path/file2`)"
161
-
162
- A path ending with '.json' will receive structured output in JSON format. The
163
- log file will not have an ending ']' automatically written to it due to the
164
- appending nature of logging. It must be appended manually to make the content
165
- valid JSON.
166
-
167
- * --detailed-exitcodes:
168
- Provide transaction information via exit codes. If this is enabled, an exit
169
- code of '1' means at least one device had a compile failure, an exit code of
170
- '2' means at least one device had resource changes, and an exit code of '4'
171
- means at least one device had resource failures. Exit codes of '3', '5', '6',
172
- or '7' means that a bitwise combination of the preceding exit codes happened.
173
-
174
- * --deviceconfig:
175
- Path to the device config file for puppet device.
176
- Default: $confdir/device.conf
177
-
178
- * --waitforcert, -w:
179
- This option only matters for targets that do not yet have certificates
180
- and it is enabled by default, with a value of 120 (seconds). This causes
181
- +puppet device+ to poll the server every 2 minutes and ask it to sign a
182
- certificate request. This is useful for the initial setup of a target.
183
- You can turn off waiting for certificates by specifying a time of 0.
184
-
185
- * --libdir:
186
- Override the per-device libdir with a local directory. Specifying a libdir also
187
- disables pluginsync. This is useful for testing.
188
-
189
- A path ending with '.jsonl' will receive structured output in JSON Lines
190
- format.
191
-
192
- * --apply:
193
- Apply a manifest against a remote target. Target must be specified.
194
-
195
- * --facts:
196
- Displays the facts of a remote target. Target must be specified.
197
-
198
- * --resource:
199
- Displays a resource state as Puppet code, roughly equivalent to
200
- `puppet resource`. Can be filtered by title. Requires --target be specified.
201
-
202
- * --target:
203
- Target a specific device/certificate in the device.conf. Doing so will perform a
204
- device run against only that device/certificate.
205
-
206
- * --to_yaml:
207
- Output found resources in yaml format, suitable to use with Hiera and
208
- create_resources.
209
-
210
- * --user:
211
- The user to run as.
212
-
213
-
214
- EXAMPLE
215
- -------
216
- $ puppet device --target remotehost --verbose
217
-
218
- AUTHOR
219
- ------
220
- Brice Figureau
221
-
222
-
223
- COPYRIGHT
224
- ---------
225
- Copyright (c) 2011-2018 Puppet Inc., LLC
226
- Licensed under the Apache 2.0 License
227
- HELP
88
+ <<~HELP
89
+
90
+ puppet-device(8) -- #{ summary }
91
+ ========
92
+
93
+ SYNOPSIS
94
+ --------
95
+ Retrieves catalogs from the Puppet master and applies them to remote devices.
96
+
97
+ This subcommand can be run manually; or periodically using cron,
98
+ a scheduled task, or a similar tool.
99
+
100
+
101
+ USAGE
102
+ -----
103
+ puppet device [-h|--help] [-v|--verbose] [-d|--debug]
104
+ [-l|--logdest syslog|<file>|console] [--detailed-exitcodes]
105
+ [--deviceconfig <file>] [-w|--waitforcert <seconds>]
106
+ [--libdir <directory>]
107
+ [-a|--apply <file>] [-f|--facts] [-r|--resource <type> [name]]
108
+ [-t|--target <device>] [--user=<user>] [-V|--version]
109
+
110
+
111
+ DESCRIPTION
112
+ -----------
113
+ Devices require a proxy Puppet agent to request certificates, collect facts,
114
+ retrieve and apply catalogs, and store reports.
115
+
116
+
117
+ USAGE NOTES
118
+ -----------
119
+ Devices managed by the puppet-device subcommand on a Puppet agent are
120
+ configured in device.conf, which is located at $confdir/device.conf by default,
121
+ and is configurable with the $deviceconfig setting.
122
+
123
+ The device.conf file is an INI-like file, with one section per device:
124
+
125
+ [<DEVICE_CERTNAME>]
126
+ type <TYPE>
127
+ url <URL>
128
+ debug
129
+
130
+ The section name specifies the certname of the device.
131
+
132
+ The values for the type and url properties are specific to each type of device.
133
+
134
+ The optional debug property specifies transport-level debugging,
135
+ and is limited to telnet and ssh transports.
136
+
137
+ See https://puppet.com/docs/puppet/latest/config_file_device.html for details.
138
+
139
+
140
+ OPTIONS
141
+ -------
142
+ Note that any setting that's valid in the configuration file is also a valid
143
+ long argument. For example, 'server' is a valid configuration parameter, so
144
+ you can specify '--server <servername>' as an argument.
145
+
146
+ * --help, -h:
147
+ Print this help message
148
+
149
+ * --verbose, -v:
150
+ Turn on verbose reporting.
151
+
152
+ * --debug, -d:
153
+ Enable full debugging.
154
+
155
+ * --logdest, -l:
156
+ Where to send log messages. Choose between 'syslog' (the POSIX syslog
157
+ service), 'console', or the path to a log file. If debugging or verbosity is
158
+ enabled, this defaults to 'console'. Otherwise, it defaults to 'syslog'.
159
+ Multiple destinations can be set using a comma separated list
160
+ (eg: `/path/file1,console,/path/file2`)"
161
+
162
+ A path ending with '.json' will receive structured output in JSON format. The
163
+ log file will not have an ending ']' automatically written to it due to the
164
+ appending nature of logging. It must be appended manually to make the content
165
+ valid JSON.
166
+
167
+ * --detailed-exitcodes:
168
+ Provide transaction information via exit codes. If this is enabled, an exit
169
+ code of '1' means at least one device had a compile failure, an exit code of
170
+ '2' means at least one device had resource changes, and an exit code of '4'
171
+ means at least one device had resource failures. Exit codes of '3', '5', '6',
172
+ or '7' means that a bitwise combination of the preceding exit codes happened.
173
+
174
+ * --deviceconfig:
175
+ Path to the device config file for puppet device.
176
+ Default: $confdir/device.conf
177
+
178
+ * --waitforcert, -w:
179
+ This option only matters for targets that do not yet have certificates
180
+ and it is enabled by default, with a value of 120 (seconds). This causes
181
+ +puppet device+ to poll the server every 2 minutes and ask it to sign a
182
+ certificate request. This is useful for the initial setup of a target.
183
+ You can turn off waiting for certificates by specifying a time of 0.
184
+
185
+ * --libdir:
186
+ Override the per-device libdir with a local directory. Specifying a libdir also
187
+ disables pluginsync. This is useful for testing.
188
+
189
+ A path ending with '.jsonl' will receive structured output in JSON Lines
190
+ format.
191
+
192
+ * --apply:
193
+ Apply a manifest against a remote target. Target must be specified.
194
+
195
+ * --facts:
196
+ Displays the facts of a remote target. Target must be specified.
197
+
198
+ * --resource:
199
+ Displays a resource state as Puppet code, roughly equivalent to
200
+ `puppet resource`. Can be filtered by title. Requires --target be specified.
201
+
202
+ * --target:
203
+ Target a specific device/certificate in the device.conf. Doing so will perform a
204
+ device run against only that device/certificate.
205
+
206
+ * --to_yaml:
207
+ Output found resources in yaml format, suitable to use with Hiera and
208
+ create_resources.
209
+
210
+ * --user:
211
+ The user to run as.
212
+
213
+
214
+ EXAMPLE
215
+ -------
216
+ $ puppet device --target remotehost --verbose
217
+
218
+ AUTHOR
219
+ ------
220
+ Brice Figureau
221
+
222
+
223
+ COPYRIGHT
224
+ ---------
225
+ Copyright (c) 2011-2018 Puppet Inc., LLC
226
+ Licensed under the Apache 2.0 License
227
+ HELP
228
228
end
229
229
230
230
def main
0 commit comments