summaryrefslogtreecommitdiffstats
path: root/lib/puppet/agent.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-01-23 14:14:44 -0600
committerLuke Kanies <luke@madstop.com>2009-02-06 18:08:41 -0600
commit54344591fde1a280f38032731e0ccb19521f6611 (patch)
tree1d7424e390d06bbaa53612c46b529190694b53f3 /lib/puppet/agent.rb
parente65d7f11dd95ab5432adefeabc3179e9eb5dd050 (diff)
downloadpuppet-54344591fde1a280f38032731e0ccb19521f6611.tar.gz
puppet-54344591fde1a280f38032731e0ccb19521f6611.tar.xz
puppet-54344591fde1a280f38032731e0ccb19521f6611.zip
Moving classfile-writing to the Catalog
This work was done by the Agent class before, but it's really related to the catalog, so that's where it is now. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/agent.rb')
-rw-r--r--lib/puppet/agent.rb21
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb
index f0ee101bf..5cb6f0019 100644
--- a/lib/puppet/agent.rb
+++ b/lib/puppet/agent.rb
@@ -138,6 +138,8 @@ class Puppet::Agent
return nil unless result
result.retrieval_duration = duration
+ result.host_config = true
+ result.write_class_file
return result
end
@@ -188,25 +190,6 @@ class Puppet::Agent
lockfile.locked?
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")
- }
- rescue => detail
- Puppet.err "Could not create class file %s: %s" %
- [Puppet[:classfile], detail]
- end
- end
-
private
def self.timeout