Skip to content

Commit

Permalink
Add code to ensure interfacedetails is always an hash
Browse files Browse the repository at this point in the history
  • Loading branch information
oraziobattaglia committed Sep 14, 2021
1 parent 12eaefa commit 4c3a348
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/puppet/type/zabbix_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def munge_boolean(value)

newproperty(:interfacedetails) do
desc 'Additional interface details.'

munge do |v|
if v.is_a?(Array)
v = {}
end
end

def insync?(is)
is.to_s == should.to_s
end
Expand Down

0 comments on commit 4c3a348

Please sign in to comment.