The following custom fact:
# returns latest packerversion, e.g. 0.10.1
Facter.add("latest_packerversion") do
setcode do
url="https://www.packer.io/downloads.html"
file = open("#{url}")
contents = file.read()
match = contents.match(/Latest\sversion:\s(.*)</)
match[1]
end
end
worked using puppet 3.6.2
, but since the upgrade to 4.5.2
the following issue occurs:
Error: Facter: error while resolving custom fact "latest_packerversion":
No such file or directory @ rb_sysopen - https://www.packer.io/downloads.html
Analysis
- It seems that the
rb_sysopen
could not be found anymore for some reason (No such file or directory @ rb_sysopen
) since the upgrade to Puppet 4. - Puppet4 seems to use an embedded ruby version instead of the one installed on the host (Puppet3):
- Does
rb_sysopen
not exist in Ruby 2.1.5? No evidence was found. - Perhaps a change related to facts have occurred that could cause the issue? Nothing related was found in the release notes.
Question
Why could rb_sysopen
not be found anymore by the custom fact since the upgrade to Puppet4?