diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-04 22:23:08 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-04 22:23:08 +0000 |
| commit | d8b4b0dbf35b2b183cd62adf591ebf4650448a0d (patch) | |
| tree | d51d99be35d0702ffc08bd0e8a28e82d8daf2e6b /lib/puppet/client/master.rb | |
| parent | c0a9e5f2e9df8e6e1aed74653ae675029af8a9bb (diff) | |
| download | puppet-d8b4b0dbf35b2b183cd62adf591ebf4650448a0d.tar.gz puppet-d8b4b0dbf35b2b183cd62adf591ebf4650448a0d.tar.xz puppet-d8b4b0dbf35b2b183cd62adf591ebf4650448a0d.zip | |
adding -e ability to puppet executable
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1065 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/client/master.rb')
| -rw-r--r-- | lib/puppet/client/master.rb | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/puppet/client/master.rb b/lib/puppet/client/master.rb index cb2d6f444..390c07220 100644 --- a/lib/puppet/client/master.rb +++ b/lib/puppet/client/master.rb @@ -26,7 +26,9 @@ class Puppet::Client::MasterClient < Puppet::Client # objects. For now, just descend into the tree and perform and # necessary manipulations. def apply - Puppet.notice "Beginning configuration run" + unless @local + Puppet.notice "Beginning configuration run" + end dostorage() unless defined? @objects raise Puppet::Error, "Cannot apply; objects not defined" @@ -65,7 +67,9 @@ class Puppet::Client::MasterClient < Puppet::Client Metric.store Metric.graph end - Puppet.notice "Finished configuration run" + unless @local + Puppet.notice "Finished configuration run" + end return transaction end @@ -228,11 +232,7 @@ class Puppet::Client::MasterClient < Puppet::Client "Invalid returned objects of type %s" % objects.class end - if classes = objects.classes - self.setclasses(classes) - else - Puppet.info "No classes to store" - end + self.setclasses(objects.classes) # Clear all existing objects, so we can recreate our stack. if defined? @objects @@ -280,7 +280,15 @@ class Puppet::Client::MasterClient < Puppet::Client end end + # Store the classes in the classfile, but only if we're not local. def setclasses(ary) + if @local + return + end + unless ary and ary.length > 0 + Puppet.info "No classes to store" + return + end begin File.open(Puppet[:classfile], "w") { |f| f.puts ary.join("\n") |
