Sha256: 93c1d94f18e6e2c8da3b6a90b7c2cb405e139a55e0f710bc7ba5ec92f4c79e12
Contents?: true
Size: 823 Bytes
Versions: 37
Compression:
Stored size: 823 Bytes
Contents
class DisownForemanTemplates < ActiveRecord::Migration class FakeConfigTemplate < ActiveRecord::Base if ActiveRecord::Base.connection.table_exists?('config_templates') self.table_name = 'config_templates' else self.table_name = 'templates' end end def up update_templates_attributes :locked => false, :vendor => nil end def down update_templates_attributes :locked => true, :vendor => 'Katello' end private def update_templates_attributes(attribute_hash) templates = ["puppet.conf", "freeipa_register", "Kickstart default iPXE", "Kickstart default PXELinux", "PXELinux global default"] templates.each do |template| if (template = FakeConfigTemplate.find_by(:name => template)) template.update_attributes(attribute_hash) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems