diff options
| author | Markus Roberts <Markus@reality.com> | 2009-12-17 19:58:27 -0800 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-12-20 09:15:36 +1100 |
| commit | 813cb58815f1f8f987ad64f7c7bfb640fbcdfa81 (patch) | |
| tree | c93b3ce57cc66d6cca3eb8e43d50e087b335b050 /lib/puppet/application | |
| parent | e9a0cb7a28a34fd04db4bfe1db347da5d774f2e8 (diff) | |
| download | puppet-813cb58815f1f8f987ad64f7c7bfb640fbcdfa81.tar.gz puppet-813cb58815f1f8f987ad64f7c7bfb640fbcdfa81.tar.xz puppet-813cb58815f1f8f987ad64f7c7bfb640fbcdfa81.zip | |
Fix for #2765 (--no-fqdn regression in puppetrun)
This is basically the fix suggested on the ticket, cleaned up and
ruby-ized, with tests. The only functional modification is leaving
the default on entry2hash as --no-fqdn to preserve 0.25.1 behaviour
as the default.
Signed- ff-by: Markus Roberts <Markus@reality.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/puppetrun.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/application/puppetrun.rb b/lib/puppet/application/puppetrun.rb index 41ebf9f1a..4febcf524 100644 --- a/lib/puppet/application/puppetrun.rb +++ b/lib/puppet/application/puppetrun.rb @@ -167,12 +167,12 @@ Puppet::Application.new(:puppetrun) do if Puppet[:node_terminus] == "ldap" and (options[:all] or @classes) if options[:all] - @hosts = Puppet::Node.search("whatever").collect { |node| node.name } + @hosts = Puppet::Node.search("whatever", :fqdn => options[:fqdn]).collect { |node| node.name } puts "all: %s" % @hosts.join(", ") else @hosts = [] @classes.each do |klass| - list = Puppet::Node.search("whatever", :class => klass).collect { |node| node.name } + list = Puppet::Node.search("whatever", :fqdn => options[:fqdn], :class => klass).collect { |node| node.name } puts "%s: %s" % [klass, list.join(", ")] @hosts += list |
