summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-11-13 06:42:53 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-11-13 06:42:53 +0000
commite936fccc16c88d6060a6cc7324bd4bf223cb8c33 (patch)
treef02876733f9f4f86f78c675b69eca408080cac2f /lib
parentb2e98b1b9fa5b178819c3d5532a22066d159e978 (diff)
downloadpuppet-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
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/server/runner.rb24
1 files changed, 13 insertions, 11 deletions
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)