---
lib/puppet/rails/database/schema.rb | 1 +
lib/puppet/rails/host.rb | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/puppet/rails/database/schema.rb
b/lib/puppet/rails/database/schema.rb
index 5365ce2..a1faa43 100644
--- a/lib/puppet/rails/database/schema.rb
+++ b/lib/puppet/rails/database/schema.rb
@@ -53,6 +53,7 @@ class Puppet::Rails::Schema
create_table :hosts do |t|
t.column :name, :string, :null => false
t.column :ip, :string
+ t.column :environment, :string
t.column :last_compile, :datetime
t.column :last_freshcheck, :datetime
t.column :last_report, :datetime
diff --git a/lib/puppet/rails/host.rb b/lib/puppet/rails/host.rb
index 626edaa..a7cbfe9 100644
--- a/lib/puppet/rails/host.rb
+++ b/lib/puppet/rails/host.rb
@@ -43,6 +43,10 @@ class Puppet::Rails::Host < ActiveRecord::Base
host.ip = ip
end
+ if env = node.parameters["environment"]
+ host.environment = env
+ end
+
# Store the facts into the database.
host.setfacts node.parameters
--
1.5.4.3
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---