puppet-strings 2.1.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +78 -4
  3. data/CONTRIBUTING.md +32 -2
  4. data/README.md +81 -17
  5. data/lib/puppet-strings.rb +13 -4
  6. data/lib/puppet-strings/describe.rb +68 -0
  7. data/lib/puppet-strings/json.rb +2 -38
  8. data/lib/puppet-strings/markdown.rb +3 -1
  9. data/lib/puppet-strings/markdown/base.rb +37 -16
  10. data/lib/puppet-strings/markdown/data_type.rb +34 -0
  11. data/lib/puppet-strings/markdown/data_types.rb +41 -0
  12. data/lib/puppet-strings/markdown/function.rb +2 -2
  13. data/lib/puppet-strings/markdown/resource_type.rb +19 -2
  14. data/lib/puppet-strings/markdown/table_of_contents.rb +1 -0
  15. data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +12 -4
  16. data/lib/puppet-strings/markdown/templates/data_type.erb +93 -0
  17. data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
  18. data/lib/puppet-strings/markdown/templates/function.erb +36 -1
  19. data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
  20. data/lib/puppet-strings/markdown/templates/resource_type.erb +32 -12
  21. data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
  22. data/lib/puppet-strings/tasks/generate.rb +10 -3
  23. data/lib/puppet-strings/version.rb +1 -1
  24. data/lib/puppet-strings/yard.rb +16 -0
  25. data/lib/puppet-strings/yard/code_objects.rb +2 -0
  26. data/lib/puppet-strings/yard/code_objects/class.rb +2 -2
  27. data/lib/puppet-strings/yard/code_objects/data_type.rb +100 -0
  28. data/lib/puppet-strings/yard/code_objects/data_type_alias.rb +58 -0
  29. data/lib/puppet-strings/yard/code_objects/defined_type.rb +2 -2
  30. data/lib/puppet-strings/yard/code_objects/function.rb +4 -4
  31. data/lib/puppet-strings/yard/code_objects/plan.rb +2 -2
  32. data/lib/puppet-strings/yard/code_objects/provider.rb +1 -1
  33. data/lib/puppet-strings/yard/code_objects/task.rb +1 -1
  34. data/lib/puppet-strings/yard/code_objects/type.rb +48 -6
  35. data/lib/puppet-strings/yard/handlers.rb +3 -0
  36. data/lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb +24 -0
  37. data/lib/puppet-strings/yard/handlers/ruby/base.rb +12 -1
  38. data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +393 -0
  39. data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +2 -12
  40. data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +1 -9
  41. data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +3 -3
  42. data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +135 -0
  43. data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +56 -0
  44. data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +9 -115
  45. data/lib/puppet-strings/yard/parsers/json/parser.rb +4 -2
  46. data/lib/puppet-strings/yard/parsers/puppet/parser.rb +14 -7
  47. data/lib/puppet-strings/yard/parsers/puppet/statement.rb +25 -0
  48. data/lib/puppet-strings/yard/tags.rb +2 -0
  49. data/lib/puppet-strings/yard/tags/enum_tag.rb +12 -0
  50. data/lib/puppet-strings/yard/tags/factory.rb +16 -0
  51. data/lib/puppet-strings/yard/tags/overload_tag.rb +2 -2
  52. data/lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_data_type.erb +10 -0
  53. data/lib/puppet-strings/yard/templates/default/fulldoc/html/setup.rb +9 -0
  54. data/lib/puppet-strings/yard/templates/default/layout/html/objects.erb +2 -0
  55. data/lib/puppet-strings/yard/templates/default/layout/html/setup.rb +18 -1
  56. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/box_info.erb +10 -0
  57. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/header.erb +1 -0
  58. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
  59. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/note.erb +6 -0
  60. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/overview.erb +6 -0
  61. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +13 -0
  62. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/source.erb +12 -0
  63. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/summary.erb +4 -0
  64. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/todo.erb +6 -0
  65. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/alias_of.erb +10 -0
  66. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/box_info.erb +10 -0
  67. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/header.erb +1 -0
  68. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/note.erb +6 -0
  69. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/overview.erb +6 -0
  70. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/setup.rb +17 -0
  71. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/source.erb +12 -0
  72. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/summary.erb +4 -0
  73. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/todo.erb +6 -0
  74. data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
  75. data/lib/puppet-strings/yard/templates/default/tags/html/enum.erb +17 -0
  76. data/lib/puppet-strings/yard/templates/default/tags/setup.rb +7 -0
  77. data/lib/puppet-strings/yard/util.rb +48 -0
  78. data/lib/puppet/face/strings.rb +68 -3
  79. metadata +36 -45
  80. data/Gemfile +0 -37
  81. data/HISTORY.md +0 -218
  82. data/JSON.md +0 -802
  83. data/Rakefile +0 -93
  84. data/codecov.yml +0 -3
  85. data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
  86. data/spec/acceptance/emit_json_options.rb +0 -71
  87. data/spec/acceptance/generate_markdown_spec.rb +0 -49
  88. data/spec/acceptance/lib/util.rb +0 -163
  89. data/spec/acceptance/running_strings_generate.rb +0 -54
  90. data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
  91. data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
  92. data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
  93. data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
  94. data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
  95. data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -27
  96. data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
  97. data/spec/fixtures/acceptance/modules/test/metadata.json +0 -6
  98. data/spec/fixtures/unit/json/output.json +0 -660
  99. data/spec/fixtures/unit/json/output_with_plan.json +0 -697
  100. data/spec/fixtures/unit/json/output_without_puppet_function.json +0 -480
  101. data/spec/fixtures/unit/markdown/output.md +0 -444
  102. data/spec/fixtures/unit/markdown/output_with_plan.md +0 -478
  103. data/spec/spec_helper.rb +0 -45
  104. data/spec/spec_helper_acceptance.rb +0 -28
  105. data/spec/unit/puppet-strings/json_spec.rb +0 -229
  106. data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
  107. data/spec/unit/puppet-strings/markdown_spec.rb +0 -283
  108. data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
  109. data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -124
  110. data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
  111. data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
  112. data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
  113. data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -729
  114. data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -139
  115. data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -214
  116. data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -269
  117. data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -70
  118. data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
  119. data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -209
  120. data/spec/unit/puppet-strings/yard/util_spec.rb +0 -48
@@ -1,444 +0,0 @@
1
- # Reference
2
- <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
3
-
4
- ## Table of Contents
5
-
6
- **Classes**
7
-
8
- _Public Classes_
9
-
10
- * [`klass`](#klass): A simple class.
11
-
12
- _Private Classes_
13
-
14
- * `noparams`: Overview for class noparams
15
-
16
- **Defined types**
17
-
18
- * [`klass::dt`](#klassdt): A simple defined type.
19
-
20
- **Resource types**
21
-
22
- * [`apt_key`](#apt_key): Example resource type using the new API.
23
- * [`database`](#database): An example database server type.
24
-
25
- **Functions**
26
-
27
- * [`func`](#func): A simple Puppet function.
28
- * [`func3x`](#func3x): Documentation for an example 3.x function.
29
- * [`func4x`](#func4x): An example 4.x function.
30
- * [`func4x_1`](#func4x_1): An example 4.x function with only one signature.
31
-
32
- **Tasks**
33
-
34
- * [`(stdin)`](#(stdin)): Allows you to backup your database to local file.
35
-
36
- ## Classes
37
-
38
- ### klass
39
-
40
- An overview for a simple class.
41
-
42
- * **TODO** Do a thing
43
-
44
- * **Note** some note
45
-
46
- * **Since** 1.0.0
47
-
48
- * **See also**
49
- www.puppet.com
50
-
51
- #### Examples
52
-
53
- ##### This is an example
54
-
55
- ```puppet
56
- class { 'klass':
57
- param1 => 1,
58
- param3 => 'foo',
59
- }
60
- ```
61
-
62
- ##### This is another example
63
-
64
- ```puppet
65
- class { 'klass':
66
- param1 => 1,
67
- param3 => 'foo',
68
- }
69
- ```
70
-
71
- #### Parameters
72
-
73
- The following parameters are available in the `klass` class.
74
-
75
- ##### `param1`
76
-
77
- Data type: `Integer`
78
-
79
- First param.
80
-
81
- Default value: 1
82
-
83
- ##### `param2`
84
-
85
- Data type: `Any`
86
-
87
- Second param.
88
-
89
- Options:
90
-
91
- * **:opt1** `String`: something about opt1
92
- * **:opt2** `Hash`: a hash of stuff
93
-
94
- Default value: `undef`
95
-
96
- ##### `param3`
97
-
98
- Data type: `String`
99
-
100
- Third param.
101
-
102
- Default value: 'hi'
103
-
104
- ## Defined types
105
-
106
- ### klass::dt
107
-
108
- An overview for a simple defined type.
109
-
110
- * **Since** 1.1.0
111
-
112
- * **See also**
113
- www.puppet.com
114
-
115
- #### Examples
116
-
117
- ##### Here's an example of this type:
118
-
119
- ```puppet
120
- klass::dt { 'foo':
121
- param1 => 33,
122
- param4 => false,
123
- }
124
- ```
125
-
126
- #### Parameters
127
-
128
- The following parameters are available in the `klass::dt` defined type.
129
-
130
- ##### `param1`
131
-
132
- Data type: `Integer`
133
-
134
- First param.
135
-
136
- Default value: 44
137
-
138
- ##### `param2`
139
-
140
- Data type: `Any`
141
-
142
- Second param.
143
-
144
- Options:
145
-
146
- * **:opt1** `String`: something about opt1
147
- * **:opt2** `Hash`: a hash of stuff
148
-
149
- ##### `param3`
150
-
151
- Data type: `String`
152
-
153
- Third param.
154
-
155
- Default value: 'hi'
156
-
157
- ##### `param4`
158
-
159
- Data type: `Boolean`
160
-
161
- Fourth param.
162
-
163
- Default value: `true`
164
-
165
- ## Resource types
166
-
167
- ### apt_key
168
-
169
- This type provides Puppet with the capabilities to manage GPG keys needed
170
- by apt to perform package validation. Apt has it's own GPG keyring that can
171
- be manipulated through the `apt-key` command.
172
- **Autorequires**:
173
- If Puppet is given the location of a key file which looks like an absolute
174
- path this type will autorequire that file.
175
-
176
- #### Examples
177
-
178
- ##### here's an example
179
-
180
- ```puppet
181
- apt_key { '6F6B15509CF8E59E6E469F327F438280EF8D349F':
182
- source => 'http://apt.puppetlabs.com/pubkey.gpg'
183
- }
184
- ```
185
-
186
- #### Properties
187
-
188
- The following properties are available in the `apt_key` type.
189
-
190
- ##### `ensure`
191
-
192
- Data type: `Enum[present, absent]`
193
-
194
- Whether this apt key should be present or absent on the target system.
195
-
196
- ##### `created`
197
-
198
- Data type: `String`
199
-
200
- Date the key was created, in ISO format.
201
-
202
- #### Parameters
203
-
204
- The following parameters are available in the `apt_key` type.
205
-
206
- ##### `id`
207
-
208
- namevar
209
-
210
- Data type: `Variant[Pattern[/A(0x)?[0-9a-fA-F]{8}Z/], Pattern[/A(0x)?[0-9a-fA-F]{16}Z/], Pattern[/A(0x)?[0-9a-fA-F]{40}Z/]]`
211
- _*this data type contains a regex that may not be accurately reflected in generated documentation_
212
-
213
- The ID of the key you want to manage.
214
-
215
- ### database
216
-
217
- An example database server type.
218
-
219
- #### Examples
220
-
221
- ##### here's an example
222
-
223
- ```puppet
224
- database { 'foo':
225
- address => 'qux.baz.bar',
226
- }
227
- ```
228
-
229
- #### Properties
230
-
231
- The following properties are available in the `database` type.
232
-
233
- ##### `ensure`
234
-
235
- Valid values: present, absent, up, down
236
-
237
- Aliases: "up"=>"present", "down"=>"absent"
238
-
239
- What state the database should be in.
240
-
241
- Default value: up
242
-
243
- ##### `file`
244
-
245
- The database file to use.
246
-
247
- ##### `log_level`
248
-
249
- Valid values: debug, warn, error
250
-
251
- The log level to use.
252
-
253
- Default value: warn
254
-
255
- #### Parameters
256
-
257
- The following parameters are available in the `database` type.
258
-
259
- ##### `address`
260
-
261
- namevar
262
-
263
- The database server name.
264
-
265
- ##### `encryption_key`
266
-
267
- The encryption key to use.
268
-
269
- ##### `encrypt`
270
-
271
- Valid values: `true`, `false`, yes, no
272
-
273
- Whether or not to encrypt the database.
274
-
275
- Default value: `false`
276
-
277
- ## Functions
278
-
279
- ### func
280
-
281
- Type: Puppet Language
282
-
283
- A simple Puppet function.
284
-
285
- #### `func(Integer $param1, Any $param2, String $param3 = hi)`
286
-
287
- A simple Puppet function.
288
-
289
- Returns: `Undef` Returns nothing.
290
-
291
- Raises:
292
- * `SomeError` this is some error
293
-
294
- ##### `param1`
295
-
296
- Data type: `Integer`
297
-
298
- First param.
299
-
300
- ##### `param2`
301
-
302
- Data type: `Any`
303
-
304
- Second param.
305
-
306
- ##### `param3`
307
-
308
- Data type: `String`
309
-
310
- Third param.
311
-
312
- Options:
313
-
314
- * **:param3opt** `Array`: Something about this option
315
-
316
- ### func3x
317
-
318
- Type: Ruby 3.x API
319
-
320
- Documentation for an example 3.x function.
321
-
322
- #### `func3x(String $param1, Integer $param2)`
323
-
324
- Documentation for an example 3.x function.
325
-
326
- Returns: `Undef`
327
-
328
- ##### `param1`
329
-
330
- Data type: `String`
331
-
332
- The first parameter.
333
-
334
- ##### `param2`
335
-
336
- Data type: `Integer`
337
-
338
- The second parameter.
339
-
340
- ### func4x
341
-
342
- Type: Ruby 4.x API
343
-
344
- An example 4.x function.
345
-
346
- #### `func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3)`
347
-
348
- An overview for the first overload.
349
-
350
- Returns: `Undef` Returns nothing.
351
-
352
- ##### `param1`
353
-
354
- Data type: `Integer`
355
-
356
- The first parameter.
357
-
358
- ##### `param2`
359
-
360
- Data type: `Any`
361
-
362
- The second parameter.
363
-
364
- Options:
365
-
366
- * **:option** `String`: an option
367
- * **:option2** `String`: another option
368
-
369
- ##### `param3`
370
-
371
- Data type: `Optional[Array[String]]`
372
-
373
- The third parameter.
374
-
375
- #### `func4x(Boolean $param, Callable &$block)`
376
-
377
- An overview for the second overload.
378
-
379
- Returns: `String` Returns a string.
380
-
381
- ##### `param`
382
-
383
- Data type: `Boolean`
384
-
385
- The first parameter.
386
-
387
- ##### `&block`
388
-
389
- Data type: `Callable`
390
-
391
- The block parameter.
392
-
393
- ### func4x_1
394
-
395
- Type: Ruby 4.x API
396
-
397
- An example 4.x function with only one signature.
398
-
399
- #### `func4x_1(Integer $param1)`
400
-
401
- An example 4.x function with only one signature.
402
-
403
- Returns: `Undef` Returns nothing.
404
-
405
- ##### `param1`
406
-
407
- Data type: `Integer`
408
-
409
- The first parameter.
410
-
411
- ## Tasks
412
-
413
- ### (stdin)
414
-
415
- Allows you to backup your database to local file.
416
-
417
- **Supports noop?** false
418
-
419
- #### Parameters
420
-
421
- ##### `database`
422
-
423
- Data type: `Optional[String[1]]`
424
-
425
- Database to connect to
426
-
427
- ##### `user`
428
-
429
- Data type: `Optional[String[1]]`
430
-
431
- The user
432
-
433
- ##### `password`
434
-
435
- Data type: `Optional[String[1]]`
436
-
437
- The password
438
-
439
- ##### `sql`
440
-
441
- Data type: `String[1]`
442
-
443
- Path to file you want backup to
444
-
@@ -1,478 +0,0 @@
1
- # Reference
2
- <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
3
-
4
- ## Table of Contents
5
-
6
- **Classes**
7
-
8
- _Public Classes_
9
-
10
- * [`klass`](#klass): A simple class.
11
-
12
- _Private Classes_
13
-
14
- * `noparams`: Overview for class noparams
15
-
16
- **Defined types**
17
-
18
- * [`klass::dt`](#klassdt): A simple defined type.
19
-
20
- **Resource types**
21
-
22
- * [`apt_key`](#apt_key): Example resource type using the new API.
23
- * [`database`](#database): An example database server type.
24
-
25
- **Functions**
26
-
27
- * [`func`](#func): A simple Puppet function.
28
- * [`func3x`](#func3x): Documentation for an example 3.x function.
29
- * [`func4x`](#func4x): An example 4.x function.
30
- * [`func4x_1`](#func4x_1): An example 4.x function with only one signature.
31
-
32
- **Tasks**
33
-
34
- * [`(stdin)`](#(stdin)): Allows you to backup your database to local file.
35
-
36
- **Plans**
37
-
38
- * [`plann`](#plann): A simple plan.
39
-
40
- ## Classes
41
-
42
- ### klass
43
-
44
- An overview for a simple class.
45
-
46
- * **TODO** Do a thing
47
-
48
- * **Note** some note
49
-
50
- * **Since** 1.0.0
51
-
52
- * **See also**
53
- www.puppet.com
54
-
55
- #### Examples
56
-
57
- ##### This is an example
58
-
59
- ```puppet
60
- class { 'klass':
61
- param1 => 1,
62
- param3 => 'foo',
63
- }
64
- ```
65
-
66
- ##### This is another example
67
-
68
- ```puppet
69
- class { 'klass':
70
- param1 => 1,
71
- param3 => 'foo',
72
- }
73
- ```
74
-
75
- #### Parameters
76
-
77
- The following parameters are available in the `klass` class.
78
-
79
- ##### `param1`
80
-
81
- Data type: `Integer`
82
-
83
- First param.
84
-
85
- Default value: 1
86
-
87
- ##### `param2`
88
-
89
- Data type: `Any`
90
-
91
- Second param.
92
-
93
- Options:
94
-
95
- * **:opt1** `String`: something about opt1
96
- * **:opt2** `Hash`: a hash of stuff
97
-
98
- Default value: `undef`
99
-
100
- ##### `param3`
101
-
102
- Data type: `String`
103
-
104
- Third param.
105
-
106
- Default value: 'hi'
107
-
108
- ## Defined types
109
-
110
- ### klass::dt
111
-
112
- An overview for a simple defined type.
113
-
114
- * **Since** 1.1.0
115
-
116
- * **See also**
117
- www.puppet.com
118
-
119
- #### Examples
120
-
121
- ##### Here's an example of this type:
122
-
123
- ```puppet
124
- klass::dt { 'foo':
125
- param1 => 33,
126
- param4 => false,
127
- }
128
- ```
129
-
130
- #### Parameters
131
-
132
- The following parameters are available in the `klass::dt` defined type.
133
-
134
- ##### `param1`
135
-
136
- Data type: `Integer`
137
-
138
- First param.
139
-
140
- Default value: 44
141
-
142
- ##### `param2`
143
-
144
- Data type: `Any`
145
-
146
- Second param.
147
-
148
- Options:
149
-
150
- * **:opt1** `String`: something about opt1
151
- * **:opt2** `Hash`: a hash of stuff
152
-
153
- ##### `param3`
154
-
155
- Data type: `String`
156
-
157
- Third param.
158
-
159
- Default value: 'hi'
160
-
161
- ##### `param4`
162
-
163
- Data type: `Boolean`
164
-
165
- Fourth param.
166
-
167
- Default value: `true`
168
-
169
- ## Resource types
170
-
171
- ### apt_key
172
-
173
- This type provides Puppet with the capabilities to manage GPG keys needed
174
- by apt to perform package validation. Apt has it's own GPG keyring that can
175
- be manipulated through the `apt-key` command.
176
- **Autorequires**:
177
- If Puppet is given the location of a key file which looks like an absolute
178
- path this type will autorequire that file.
179
-
180
- #### Examples
181
-
182
- ##### here's an example
183
-
184
- ```puppet
185
- apt_key { '6F6B15509CF8E59E6E469F327F438280EF8D349F':
186
- source => 'http://apt.puppetlabs.com/pubkey.gpg'
187
- }
188
- ```
189
-
190
- #### Properties
191
-
192
- The following properties are available in the `apt_key` type.
193
-
194
- ##### `ensure`
195
-
196
- Data type: `Enum[present, absent]`
197
-
198
- Whether this apt key should be present or absent on the target system.
199
-
200
- ##### `created`
201
-
202
- Data type: `String`
203
-
204
- Date the key was created, in ISO format.
205
-
206
- #### Parameters
207
-
208
- The following parameters are available in the `apt_key` type.
209
-
210
- ##### `id`
211
-
212
- namevar
213
-
214
- Data type: `Variant[Pattern[/A(0x)?[0-9a-fA-F]{8}Z/], Pattern[/A(0x)?[0-9a-fA-F]{16}Z/], Pattern[/A(0x)?[0-9a-fA-F]{40}Z/]]`
215
- _*this data type contains a regex that may not be accurately reflected in generated documentation_
216
-
217
- The ID of the key you want to manage.
218
-
219
- ### database
220
-
221
- An example database server type.
222
-
223
- #### Examples
224
-
225
- ##### here's an example
226
-
227
- ```puppet
228
- database { 'foo':
229
- address => 'qux.baz.bar',
230
- }
231
- ```
232
-
233
- #### Properties
234
-
235
- The following properties are available in the `database` type.
236
-
237
- ##### `ensure`
238
-
239
- Valid values: present, absent, up, down
240
-
241
- Aliases: "up"=>"present", "down"=>"absent"
242
-
243
- What state the database should be in.
244
-
245
- Default value: up
246
-
247
- ##### `file`
248
-
249
- The database file to use.
250
-
251
- ##### `log_level`
252
-
253
- Valid values: debug, warn, error
254
-
255
- The log level to use.
256
-
257
- Default value: warn
258
-
259
- #### Parameters
260
-
261
- The following parameters are available in the `database` type.
262
-
263
- ##### `address`
264
-
265
- namevar
266
-
267
- The database server name.
268
-
269
- ##### `encryption_key`
270
-
271
- The encryption key to use.
272
-
273
- ##### `encrypt`
274
-
275
- Valid values: `true`, `false`, yes, no
276
-
277
- Whether or not to encrypt the database.
278
-
279
- Default value: `false`
280
-
281
- ## Functions
282
-
283
- ### func
284
-
285
- Type: Puppet Language
286
-
287
- A simple Puppet function.
288
-
289
- #### `func(Integer $param1, Any $param2, String $param3 = hi)`
290
-
291
- A simple Puppet function.
292
-
293
- Returns: `Undef` Returns nothing.
294
-
295
- Raises:
296
- * `SomeError` this is some error
297
-
298
- ##### `param1`
299
-
300
- Data type: `Integer`
301
-
302
- First param.
303
-
304
- ##### `param2`
305
-
306
- Data type: `Any`
307
-
308
- Second param.
309
-
310
- ##### `param3`
311
-
312
- Data type: `String`
313
-
314
- Third param.
315
-
316
- Options:
317
-
318
- * **:param3opt** `Array`: Something about this option
319
-
320
- ### func3x
321
-
322
- Type: Ruby 3.x API
323
-
324
- Documentation for an example 3.x function.
325
-
326
- #### `func3x(String $param1, Integer $param2)`
327
-
328
- Documentation for an example 3.x function.
329
-
330
- Returns: `Undef`
331
-
332
- ##### `param1`
333
-
334
- Data type: `String`
335
-
336
- The first parameter.
337
-
338
- ##### `param2`
339
-
340
- Data type: `Integer`
341
-
342
- The second parameter.
343
-
344
- ### func4x
345
-
346
- Type: Ruby 4.x API
347
-
348
- An example 4.x function.
349
-
350
- #### `func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3)`
351
-
352
- An overview for the first overload.
353
-
354
- Returns: `Undef` Returns nothing.
355
-
356
- ##### `param1`
357
-
358
- Data type: `Integer`
359
-
360
- The first parameter.
361
-
362
- ##### `param2`
363
-
364
- Data type: `Any`
365
-
366
- The second parameter.
367
-
368
- Options:
369
-
370
- * **:option** `String`: an option
371
- * **:option2** `String`: another option
372
-
373
- ##### `param3`
374
-
375
- Data type: `Optional[Array[String]]`
376
-
377
- The third parameter.
378
-
379
- #### `func4x(Boolean $param, Callable &$block)`
380
-
381
- An overview for the second overload.
382
-
383
- Returns: `String` Returns a string.
384
-
385
- ##### `param`
386
-
387
- Data type: `Boolean`
388
-
389
- The first parameter.
390
-
391
- ##### `&block`
392
-
393
- Data type: `Callable`
394
-
395
- The block parameter.
396
-
397
- ### func4x_1
398
-
399
- Type: Ruby 4.x API
400
-
401
- An example 4.x function with only one signature.
402
-
403
- #### `func4x_1(Integer $param1)`
404
-
405
- An example 4.x function with only one signature.
406
-
407
- Returns: `Undef` Returns nothing.
408
-
409
- ##### `param1`
410
-
411
- Data type: `Integer`
412
-
413
- The first parameter.
414
-
415
- ## Tasks
416
-
417
- ### (stdin)
418
-
419
- Allows you to backup your database to local file.
420
-
421
- **Supports noop?** false
422
-
423
- #### Parameters
424
-
425
- ##### `database`
426
-
427
- Data type: `Optional[String[1]]`
428
-
429
- Database to connect to
430
-
431
- ##### `user`
432
-
433
- Data type: `Optional[String[1]]`
434
-
435
- The user
436
-
437
- ##### `password`
438
-
439
- Data type: `Optional[String[1]]`
440
-
441
- The password
442
-
443
- ##### `sql`
444
-
445
- Data type: `String[1]`
446
-
447
- Path to file you want backup to
448
-
449
- ## Plans
450
-
451
- ### plann
452
-
453
- A simple plan.
454
-
455
- #### Parameters
456
-
457
- The following parameters are available in the `plann` plan.
458
-
459
- ##### `param1`
460
-
461
- Data type: `String`
462
-
463
- First param.
464
-
465
- ##### `param2`
466
-
467
- Data type: `Any`
468
-
469
- Second param.
470
-
471
- ##### `param3`
472
-
473
- Data type: `Integer`
474
-
475
- Third param.
476
-
477
- Default value: 1
478
-