Sha256: 82f637b3a6911ad92495f8fea097f7b5d09d8a549445179b804637a7358020af

Contents?: true

Size: 478 Bytes

Versions: 4

Compression:

Stored size: 478 Bytes

Contents

class CreateKickstartBootdiskTemplate < ActiveRecord::Migration
  def self.up
    ConfigTemplate.find_or_create_by_name(
      :name => 'Kickstart boot disk gPXE',
      :template_kind_id => TemplateKind.find_by_name('gPXE').try(:id),
      :snippet => false,
      :template => File.read(File.join(Bootdisk::Engine.root, 'app', 'views', 'bootdisk', 'kickstart_v1.erb'))
    )
  end

  def self.down
    ConfigTemplate.destroy_all(:name => 'Kickstart boot disk gPXE')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_bootdisk-1.2.3 db/migrate/20130915133321_create_kickstart_bootdisk_template.rb
foreman_bootdisk-1.2.2 db/migrate/20130915133321_create_kickstart_bootdisk_template.rb
foreman_bootdisk-1.2.1 db/migrate/20130915133321_create_kickstart_bootdisk_template.rb
foreman_bootdisk-1.2.0 db/migrate/20130915133321_create_kickstart_bootdisk_template.rb