Sha256: 327057f81f9f3e5384e9598c9832758213b36a07ca94d8b93e0eb449c523f68f
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
kind = TemplateKind.find_or_create_by_name('Bootdisk') ConfigTemplate.without_auditing do content = File.read(File.join(ForemanBootdisk::Engine.root, 'app', 'views', 'foreman_bootdisk', 'host.erb')) tmpl = ConfigTemplate.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 = ConfigTemplate.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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_bootdisk-5.0.0 | db/seeds.d/50-bootdisk_templates.rb |
foreman_bootdisk-4.0.2 | db/seeds.d/50-bootdisk_templates.rb |