From cb3e5e10d76a4a0f44e16c5bf36c69b65ae18fbb Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Thu, 5 Nov 2009 20:20:35 +0100 Subject: Fix #2787 - Storeconfig doesn't store/update node ip and environment anymore Since the storeconfig refactoring (ie moving the catalog storeconfig system under the indirector) in 0.25 we lost the capability to store the node ip and node environment name. This patch restores this feature. Signed-off-by: Brice Figureau --- lib/puppet/indirector/catalog/active_record.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/puppet/indirector/catalog/active_record.rb b/lib/puppet/indirector/catalog/active_record.rb index e3b56ece6..575ce72fb 100644 --- a/lib/puppet/indirector/catalog/active_record.rb +++ b/lib/puppet/indirector/catalog/active_record.rb @@ -30,6 +30,11 @@ class Puppet::Resource::Catalog::ActiveRecord < Puppet::Indirector::ActiveRecord host.merge_resources(catalog.vertices) host.last_compile = Time.now + if node = Puppet::Node.find(catalog.name) + host.ip = node.parameters["ipaddress"] + host.environment = node.environment + end + host.save end end -- cgit