Puppet Function: patterndb_simple_example
- Defined in:
-
lib/puppet/parser/functions/patterndb_simple_example.rb
- Function type:
- Ruby 3.x API
Overview
patterndb_simple_example() ⇒ Any
2
3
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/puppet/parser/functions/patterndb_simple_example.rb', line 2
newfunction(:patterndb_simple_example) do |args|
id = 0
examples = args[0]
rule_id = args[1]
return if examples.size < 1
examples.each do |example|
example_id = "#{rule_id}-#{id}"
Puppet::Parser::Functions.function(:create_resources)
function_create_resources(['patterndb::simple::example', { example_id => example} ])
id = id + 1
end
end
|