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