Sha256: 2d8db03abc1df821c0f2b570d46f60ee44a12e349a672ebbdc12cbd867a76175
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
kind = TemplateKind.find_or_create_by_name('Bootdisk') ProvisioningTemplate.without_auditing do content = File.read(File.join(ForemanBootdisk::Engine.root, 'app', 'views', 'foreman_bootdisk', 'host.erb')) tmpl = ProvisioningTemplate.find_or_create_by_name( :name => 'Boot disk iPXE - host', :template_kind_id => kind.id, :snippet => false, :template => content ) tmpl.attributes = { :template => content, :default => true, :vendor => "Foreman boot disk", :locked => true } tmpl.save!(:validate => false) if tmpl.changes.present? content = File.read(File.join(ForemanBootdisk::Engine.root, 'app', 'views', 'foreman_bootdisk', 'generic_host.erb')) tmpl = ProvisioningTemplate.find_or_create_by_name( :name => 'Boot disk iPXE - generic host', :template_kind_id => kind.id, :snippet => false, :template => content ) tmpl.attributes = { :template => content, :default => true, :vendor => "Foreman boot disk", :locked => true } tmpl.save!(:validate => false) if tmpl.changes.present? end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foreman_bootdisk-6.0.0 | db/seeds.d/50-bootdisk_templates.rb |