[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
James Turnbull
james at lovedthanlost.net
Fri Jan 15 09:08:16 UTC 2010
The following commit has been merged in the upstream branch:
commit 05e897e100844335b4ecaa9088d2f927753010a7
Author: Markus Roberts <Markus at reality.com>
Date: Mon Dec 21 22:20:34 2009 -0800
Fix for #2881 (ralsh doesn't find individual parsed resources)
Rather than just creating a new featureless resource for cases like:
ralsh host localhost.localdomain
(and the analogous cases with other parsed resources such as ssh keys, etc),
we first check to see if the appropriate provider can find a resource with
the requested name. If so, we use it; if not we fall back to the featureless
form.
There are a number of potential shortcomings with this fix:
* It may not be particularly performant if there are many resources to
be parsed.
* It always (and only) checks the first provider; perhaps it should try
all providers of the appropriate type.
* It only checks the name property, and not any aliases or host_aliases.
Signed-off-by: Markus Roberts <Markus at reality.com>
diff --git a/lib/puppet/application/ralsh.rb b/lib/puppet/application/ralsh.rb
index a9921d7..2a0f008 100644
--- a/lib/puppet/application/ralsh.rb
+++ b/lib/puppet/application/ralsh.rb
@@ -91,7 +91,7 @@ Puppet::Application.new(:ralsh) do
transbucket.sort { |a,b| a.name <=> b.name }.collect(&format)
else
if name
- obj = typeobj.new(:name => name, :check => properties)
+ obj = typeobj.instances.find { |o| o.name == name } || typeobj.new(:name => name, :check => properties)
vals = obj.retrieve
unless params.empty?
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list