diff options
| author | Luke Kanies <luke@madstop.com> | 2008-05-20 23:59:04 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-05-20 23:59:04 -0500 |
| commit | 419f2443c40116623b5c82f03eafcc85deeabcad (patch) | |
| tree | 5cff2408998693744352c223743c43aa2c9c60cd /lib/puppet/reference | |
| parent | 3e13bd59689a27a393c847bdbed3ac38765d79e9 (diff) | |
| download | puppet-419f2443c40116623b5c82f03eafcc85deeabcad.tar.gz puppet-419f2443c40116623b5c82f03eafcc85deeabcad.tar.xz puppet-419f2443c40116623b5c82f03eafcc85deeabcad.zip | |
Adding support for settings within the existing Facter provider confines.
This renames the 'facter' confine to 'variable', and it prefers
settings to facts. There shouldn't really be any overlap, so
it shouldn't be a problem.
Diffstat (limited to 'lib/puppet/reference')
| -rw-r--r-- | lib/puppet/reference/providers.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/reference/providers.rb b/lib/puppet/reference/providers.rb index 610c7550d..8fd2dbadc 100644 --- a/lib/puppet/reference/providers.rb +++ b/lib/puppet/reference/providers.rb @@ -63,9 +63,13 @@ providers = Puppet::Util::Reference.newreference :providers, :title => "Provider case test when :exists: details += " - Missing files %s\n" % values.join(", ") - when :facter: + when :variable: values.each do |name, facts| - details += " - Fact %s (currently %s) not in list %s\n" % [name, Facter.value(name).inspect, facts.join(", ")] + if Puppet.settings.valid?(name) + details += " - Setting %s (currently %s) not in list %s\n" % [name, Puppet.settings.value(name).inspect, facts.join(", ")] + else + details += " - Fact %s (currently %s) not in list %s\n" % [name, Facter.value(name).inspect, facts.join(", ")] + end end when :true: details += " - Got %s true tests that should have been false\n" % values |
