summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-08-14 17:31:22 -0700
committerMarkus Roberts <Markus@reality.com>2010-08-21 13:07:20 -0700
commit0c3075443c80227c1e35cfb4952d3971c1c0adeb (patch)
tree187282cbc22e1d4f5f91a64731e87d7c271d0e7a
parent3df0490c9dbc59e27869e09864177536400a5ae3 (diff)
downloadpuppet-0c3075443c80227c1e35cfb4952d3971c1c0adeb.tar.gz
puppet-0c3075443c80227c1e35cfb4952d3971c1c0adeb.tar.xz
puppet-0c3075443c80227c1e35cfb4952d3971c1c0adeb.zip
Maint. Removing code at the request of the original author
A contributor has requested that his changes be removed from puppet.
-rwxr-xr-xext/puppetlast16
-rw-r--r--lib/puppet/indirector/yaml.rb11
2 files changed, 1 insertions, 26 deletions
diff --git a/ext/puppetlast b/ext/puppetlast
deleted file mode 100755
index 7434368a3..000000000
--- a/ext/puppetlast
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-# Puppetlast, a script to output the last check-in time of nodes. Also outputs the cached configuration state, if expired or not.
-#
-# AJ "Fujin" Christensen <aj@junglist.gen.nz>
-#
-require 'puppet'
-require 'time'
-
-Puppet[:config] = "/etc/puppet/puppet.conf"
-Puppet.parse_config
-Puppet[:name] = "puppetmasterd"
-Puppet::Node::Facts.terminus_class = :yaml
-
-Puppet::Node::Facts.search("*").sort { |a,b| a.name <=> b.name }.each do |node|
- puts "#{node.name} checked in #{((Time.now - Time.parse(node.values[:_timestamp].to_s)) / 60).floor} minutes ago. Version #{node.values['puppetversion']}#{node.expired? ? ' Cache expired.' : ''}"
-end
diff --git a/lib/puppet/indirector/yaml.rb b/lib/puppet/indirector/yaml.rb
index c7c053f4b..13f3c1e79 100644
--- a/lib/puppet/indirector/yaml.rb
+++ b/lib/puppet/indirector/yaml.rb
@@ -41,21 +41,12 @@ class Puppet::Indirector::Yaml < Puppet::Indirector::Terminus
end
end
- # Get the yaml directory
- def base
- Puppet.run_mode.master? ? Puppet[:yamldir] : Puppet[:clientyamldir]
- end
-
# Return the path to a given node's file.
def path(name)
+ base = Puppet.run_mode.master? ? Puppet[:yamldir] : Puppet[:clientyamldir]
File.join(base, self.class.indirection_name.to_s, name.to_s + ".yaml")
end
- # Do a glob on the yaml directory, loading each file found
- def search(request)
- Dir.glob(File.join(base, self.class.indirection_name.to_s, request.key)).collect { |f| YAML.load_file(f) }
- end
-
private
def from_yaml(text)