1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/puppet/parser/functions/merge_hardening.rb', line 1
Puppet::Parser::Functions::newfunction(:merge_hardening, :type => :rvalue) do |args|
user_params = args[0]
hardening_params = args[1]
if user_params.instance_of? Hash and
hardening_params.instance_of? Hash
hardening_params.each do |k,v|
if not user_params.key? k
user_params[k] = v
end
if user_params[k] != hardening_params[k]
end
end
else
if user_params.nil?
user_params = hardening_params
end
if user_params != hardening_params
end
end
user_params
end
|