On Sep 18, 2008, at 7:52 PM, Andrew Shafer wrote:

>
> Issues 1500
>
> Entering this block was resetting hosts
>
> Signed-off-by: Andrew Shafer <[EMAIL PROTECTED]>
> ---
> bin/puppetrun |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/bin/puppetrun b/bin/puppetrun
> index f33c7f8..28f72d9 100755
> --- a/bin/puppetrun
> +++ b/bin/puppetrun
> @@ -245,7 +245,7 @@ end
> # Now parse the config
> Puppet.parse_config
>
> -if Puppet[:node_terminus] = "ldap"
> +if Puppet[:node_terminus] == "ldap" and (options[:all] or classes)
>     if options[:all]
>         hosts = Puppet::Node.search("whatever").collect { |node|  
> node.name }
>         puts "all: %s" % hosts.join(", ")

'classes' is initialized as an empty array, so the second half of the  
conditional will always return true.

Use '! classes.empty?' or something similar instead.

-- 
The point of living and of being an optimist, is to be foolish enough
to believe the best is yet to come. -- Peter Ustinov
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to