From 422dea05e755f0026c7786b46a7e93624da1ac0a Mon Sep 17 00:00:00 2001 From: Andrew Shafer Date: Mon, 16 Jun 2008 02:05:38 -0600 Subject: issue 1183 Added environment awareness to --configprint Pulled the logic for --configprint --genconfig and --genmanifest out of puppet.rb Put the logic in lib/puppet/util/settings.rb and refactored it a bit Added specs for the behavior Reformated the whole spec file to use nested describe Added the new method to the executables The old behavior should be preserved, except for the env is now used --- bin/puppet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/puppet') diff --git a/bin/puppet b/bin/puppet index bb7308997..23b175087 100755 --- a/bin/puppet +++ b/bin/puppet @@ -141,8 +141,9 @@ if Puppet[:config] and File.exists? Puppet[:config] Puppet.settings.parse(Puppet[:config]) end -Puppet.genconfig -Puppet.genmanifest +if Puppet.settings.print_configs? + exit(Puppet.settings.print_configs ? 0 : 1) +end # If noop is set, then also enable diffs if Puppet[:noop] -- cgit From 9c1ab147b3570003bb7907d8a0cadca52869f4bd Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Tue, 17 Jun 2008 09:43:45 +1000 Subject: Fixed #1371 - Updated bin/puppet to use Node.find --- bin/puppet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/puppet') diff --git a/bin/puppet b/bin/puppet index 23b175087..5e10ad460 100755 --- a/bin/puppet +++ b/bin/puppet @@ -187,7 +187,7 @@ facts = Puppet::Node::Facts.find("me") facts.name = facts.values["hostname"] # Find our Node -node = Puppet::Node.find_by_any_name(facts.name) +node = Puppet::Node.find(facts.name) # Merge in the facts. node.merge(facts.values) -- cgit