diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-13 06:42:53 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-13 06:42:53 +0000 |
| commit | e936fccc16c88d6060a6cc7324bd4bf223cb8c33 (patch) | |
| tree | f02876733f9f4f86f78c675b69eca408080cac2f | |
| parent | b2e98b1b9fa5b178819c3d5532a22066d159e978 (diff) | |
| download | puppet-e936fccc16c88d6060a6cc7324bd4bf223cb8c33.tar.gz puppet-e936fccc16c88d6060a6cc7324bd4bf223cb8c33.tar.xz puppet-e936fccc16c88d6060a6cc7324bd4bf223cb8c33.zip | |
Removing the caveat so that the log message is always provided during a run.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1871 980ebf18-57e1-0310-9a29-db15c13687c0
| -rwxr-xr-x | bin/puppetrun | 2 | ||||
| -rwxr-xr-x | lib/puppet/server/runner.rb | 24 |
2 files changed, 14 insertions, 12 deletions
diff --git a/bin/puppetrun b/bin/puppetrun index 5fa5ae4ad..f2e1e1ddf 100755 --- a/bin/puppetrun +++ b/bin/puppetrun @@ -227,7 +227,7 @@ begin when "--host" hosts << arg when "--help" - if Puppet.feature.usage? + if Puppet.features.usage? RDoc::usage && exit else puts "No help available unless you have RDoc::usage installed" diff --git a/lib/puppet/server/runner.rb b/lib/puppet/server/runner.rb index e73a62156..985ed2d3b 100755 --- a/lib/puppet/server/runner.rb +++ b/lib/puppet/server/runner.rb @@ -10,7 +10,7 @@ class Server # Run the client configuration right now, optionally specifying # tags and whether to ignore schedules - def run(tags = [], ignoreschedules = false, fg = true, client = nil, clientip = nil) + def run(tags = nil, ignoreschedules = false, fg = true, client = nil, clientip = nil) # We need to retrieve the client master = Puppet::Client::MasterClient.instance @@ -23,7 +23,7 @@ class Server return "running" end - if tags == "" or tags == [] + if tags == "" tags = nil end @@ -31,19 +31,21 @@ class Server ignoreschedules == nil end + msg = "" if client - msg = "%s(%s) triggered run" % [client, clientip] - if tags - msg += " with tags %s" % tags.join(", ") - end - - if ignoreschedules - msg += " without schedules" - end + msg = "%s(%s) " % [client, clientip] + end + msg += "triggered run" % + if tags + msg += " with tags %s" % tags + end - Puppet.notice msg + if ignoreschedules + msg += " without schedules" end + Puppet.notice msg + # And then we need to tell it to run, with this extra info. if fg master.run(tags, ignoreschedules) |
