@@ -266,20 +266,33 @@ and `subscribe`.
266
266
267
267
``` puppet
268
268
class { 'stdlib::manage':
269
- 'create_resources' => {
270
- 'file' => {
271
- '/etc/motd.d/hello' => {
272
- 'content' => 'I say Hi',
273
- 'notify' => 'Service[sshd]',
269
+ 'create_resources' => {
270
+ 'file' => {
271
+ '/etc/motd.d/hello' => {
272
+ 'content' => 'I say Hi',
273
+ 'notify' => 'Service[sshd]',
274
+ },
275
+ '/etc/motd' => {
276
+ 'ensure' => 'file',
277
+ 'epp' => {
278
+ 'template' => 'profile/motd.epp',
274
279
}
275
280
},
276
- 'package' => {
277
- 'example' => {
278
- 'ensure' => 'installed',
279
- 'subscribe' => ['Service[sshd]', 'Exec[something]'] ,
281
+ '/etc/information' => {
282
+ 'ensure' => 'file',
283
+ 'erb' => {
284
+ 'template' => 'profile/informaiton.erb' ,
280
285
}
281
286
}
287
+ },
288
+ 'package' => {
289
+ 'example' => {
290
+ 'ensure' => 'installed',
291
+ 'subscribe' => ['Service[sshd]', 'Exec[something]'],
292
+ }
282
293
}
294
+ }
295
+ }
283
296
```
284
297
285
298
#####
@@ -290,6 +303,15 @@ stdlib::manage::create_resources:
290
303
'/etc/motd.d/hello':
291
304
content: I say Hi
292
305
notify: 'Service[sshd]'
306
+ '/etc/motd':
307
+ ensure: 'file'
308
+ epp:
309
+ template: 'profile/motd.epp'
310
+ context: {}
311
+ '/etc/information':
312
+ ensure: 'file'
313
+ erb:
314
+ template: 'profile/information.erb'
293
315
package:
294
316
example:
295
317
ensure: installed
@@ -309,7 +331,8 @@ The following parameters are available in the `stdlib::manage` class:
309
331
Data type: ` Hash[String, Hash] `
310
332
311
333
A hash of resources to create
312
- NOTE: functions, such as ` template ` or ` epp ` , are not evaluated.
334
+ NOTE: functions, such as ` template ` or ` epp ` , are not directly evaluated
335
+ but processed as Puppet code based on epp and erb hash keys.
313
336
314
337
Default value: ` {} `
315
338
0 commit comments