You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across the following error when using ghostbuster_facts:
PUPPETDB_URL='http://localhost:8080/' HIERA_YAML_PATH='/tmp/hiera.yaml' find . -type f -
exec puppet-lint --only-checks ghostbuster_facts {} \+
Whoops! It looks like puppet-lint has encountered an error that it doesn't
know how to handle. Please open an issue at https://github.com/rodjek/puppet-lint
and paste the following output into the issue description.
---
puppet-lint version: 2.3.3
ruby version: 2.1.9-p490
platform: x86_64-darwin16.0
file path: ./modules/apt/lib/facter/apt_updates.rb
file contents:
apt_package_updates = nil
Facter.add("apt_has_updates") do
confine :osfamily => 'Debian'
if File.executable?("/usr/bin/apt-get")
apt_get_result = Facter::Util::Resolution.exec('/usr/bin/apt-get -s upgrade 2>&1')
if not apt_get_result.nil?
apt_package_updates = [[], []]
apt_get_result.each_line do |line|
if line =~ /^Inst\s/
package = line.gsub(/^Inst\s([^\s]+)\s.*/, '\1').strip
apt_package_updates[0].push(package)
security_matches = [
/ Debian[^\s]+-updates /,
/ Debian-Security:/,
/ Ubuntu[^\s]+-security /,
/ gNewSense[^\s]+-security /
]
re = Regexp.union(security_matches)
if line.match(re)
apt_package_updates[1].push(package)
end
end
end
end
end
setcode do
if not apt_package_updates.nil? and apt_package_updates.length == 2
apt_package_updates != [[], []]
end
end
end
Facter.add("apt_package_updates") do
confine :apt_has_updates => true
setcode do
if Facter.version < '2.0.0'
apt_package_updates[0].join(',')
else
apt_package_updates[0]
end
end
end
Facter.add("apt_updates") do
confine :apt_has_updates => true
setcode do
Integer(apt_package_updates[0].length)
end
end
Facter.add("apt_security_updates") do
confine :apt_has_updates => true
setcode do
Integer(apt_package_updates[1].length)
end
end
Hello
I came across the following error when using ghostbuster_facts:
error:
Here are the gem's I currently have loaded:
Has anyone else came across this issue as well?
The text was updated successfully, but these errors were encountered: