summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-12-07 14:27:04 +0100
committervarac <varacanero@zeromail.org>2015-12-07 14:27:04 +0100
commita70c52c1d4f399c22fa6c71289031350a1da44b5 (patch)
tree3a0b90f82aea8f1ee512f2395db0261d2bf5db83 /lib
parent6b27efb4346e61280f041b63dd8df7ad1f2e7f81 (diff)
Fix loading of util/debian.rb for custom facts
requirering the facter/util/debian.rb module causes puppet warnings on wheezy hosts, and custom facts like `$::debian_codename` cannot be evaluated. warning: Could not load fact file /srv/dev/projects/puppet/shared-modules//apt/lib/facter/debian_nextcodename.rb: no such file to load -- facter/util/debian Removing the require line solves this.
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/debian_codename.rb2
-rw-r--r--lib/facter/debian_lts.rb2
-rw-r--r--lib/facter/debian_nextcodename.rb2
-rw-r--r--lib/facter/debian_release.rb2
-rw-r--r--lib/facter/ubuntu_nextcodename.rb2
5 files changed, 10 insertions, 0 deletions
diff --git a/lib/facter/debian_codename.rb b/lib/facter/debian_codename.rb
index 06ec5ff..254877a 100644
--- a/lib/facter/debian_codename.rb
+++ b/lib/facter/debian_codename.rb
@@ -1,5 +1,7 @@
begin
require 'facter/util/debian'
+rescue LoadError
+ require "#{File.dirname(__FILE__)}/util/debian"
end
def version_to_codename(version)
diff --git a/lib/facter/debian_lts.rb b/lib/facter/debian_lts.rb
index 1c137e1..f53a9eb 100644
--- a/lib/facter/debian_lts.rb
+++ b/lib/facter/debian_lts.rb
@@ -1,5 +1,7 @@
begin
require 'facter/util/debian'
+rescue LoadError
+ require "#{File.dirname(__FILE__)}/util/debian"
end
Facter.add(:debian_lts) do
diff --git a/lib/facter/debian_nextcodename.rb b/lib/facter/debian_nextcodename.rb
index af16cc8..6e994a4 100644
--- a/lib/facter/debian_nextcodename.rb
+++ b/lib/facter/debian_nextcodename.rb
@@ -1,5 +1,7 @@
begin
require 'facter/util/debian'
+rescue LoadError
+ require "#{File.dirname(__FILE__)}/util/debian"
end
def debian_codename_to_next(codename)
diff --git a/lib/facter/debian_release.rb b/lib/facter/debian_release.rb
index 09e8eef..2c334cc 100644
--- a/lib/facter/debian_release.rb
+++ b/lib/facter/debian_release.rb
@@ -1,5 +1,7 @@
begin
require 'facter/util/debian'
+rescue LoadError
+ require "#{File.dirname(__FILE__)}/util/debian"
end
def debian_codename_to_release(codename)
diff --git a/lib/facter/ubuntu_nextcodename.rb b/lib/facter/ubuntu_nextcodename.rb
index 38b64ad..ba985bf 100644
--- a/lib/facter/ubuntu_nextcodename.rb
+++ b/lib/facter/ubuntu_nextcodename.rb
@@ -1,5 +1,7 @@
begin
require 'facter/util/ubuntu'
+rescue LoadError
+ require "#{File.dirname(__FILE__)}/util/debian"
end
def ubuntu_codename_to_next(codename)