Hello Puppet User,
Infos:
Puppet-client-version = 3.8.4
facter= 2.4.4
Puppetserver = 4.10.0
I wrote a fact to discover all firewallrules on a windows machine.
Factname is windows_firewallrules.rb and returnvalue is a nested hash.
if i execute following command.
facter -p windows_firewallrules
I can see all firewallrules correctly. But if i execute
puppet agent -tdv
I get a error and the puppetrun stops.
Errormessage:
invalid byte sequence in UTF-8
I found out the issue is caused from my windows_firewallrules fact.
I have already set the encoding fix to UTF-8.
for example:
name.encode!('UTF-8', :invalid => :replace)
key.encode!('UTF-8', :invalid => :replace)
value.encode!('UTF-8', :invalid => :replace)
windows_firewallrules[name][key] = value
Strangely if i iterate through my nested hash (windows_firewallrules)
i cant see anythink wrong.
for example:
windows_firewallrules.each do |k1, v1|
if k1.encoding.to_s != 'UTF-8'
puts k1.encoding
end
v1.each do |k2, v2|
if k2.encoding.to_s != 'UTF-8'
puts k2.encoding
end
if v2.encoding.to_s != 'UTF-8'
puts v2.encoding
end
end
end
Has anyone a idea ?
Best regards
mobios
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/6b8f9821-2d9e-4538-a3cc-4134b83daa10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.