Ruby code separate from Facter facts.
Provider autoload and gems
Strange invalid value for Integer error
The code is currently working on a 3.2 server, this is running against a v4 (2.4) server. The only ruby style code in the .erb is allowed_hosts=<% @env['icinga_servers'].each do |icinga_server| -%><% ipInt = Socket.gethostbyname(icinga_server)[3] %><%= "%d.%d.%d.%d," % [ipInt[0], ipInt[1], ipInt[2], ipInt[3]] %><% end %> but as I know nothing of Java or Ruby, I'm stuck ;) Cheers
Chris
set/lookup mysql ruby array puppet v4
Thx,
Chris
Common code inclusion
ruby methods .map, .each, .gsub changes overview for puppet v3 & v4
Can anyone give me a good overview of the changes between ruby in puppet v3 & v4.
In particular the methods named above.
I need to cvt our p3 (3.2.2) system to p4, whilst at the same time, ensure that our code will run against both versions of puppet until we have fully converted.
At the moment, I frequently come across msgs like
Detail: undefined method `gsub' for nil:NilClass
for the above methods, and have to recode them.
This is doubly tricky as I know nothing about ruby ;)
Any help gratefully received
Chris
ruby / jruby : cannot see mysql file
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- mysql
but
rpm -qa|grep -i mysql
ruby-mysql-2.8.2-1.el6.x86_64
so why do I get his error?
Chris
client puppet 3.3.1; server 4.5.0