Sha256: 232c26a0b74e0a43df870655a00e0fc2f1fe2ad9ec21ad06d0f58ca15b8a138f
Contents?: true
Size: 596 Bytes
Versions: 3
Compression:
Stored size: 596 Bytes
Contents
kind = TemplateKind.where(:name => 'kexec').first_or_create ProvisioningTemplate.without_auditing do content = File.read(File.join(ForemanDiscovery::Engine.root, 'app', 'views', 'foreman_discovery', 'redhat_kexec.erb')) tmpl = ProvisioningTemplate.where(:name => 'Discovery Red Hat kexec').first_or_create( :template_kind_id => kind.id, :snippet => false, :template => content ) tmpl.attributes = { :template => content, :default => true, :vendor => "Foreman Discovery", :locked => false } tmpl.save!(:validate => false) if tmpl.changes.present? end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
foreman_discovery-5.0.2 | db/seeds.d/50_discovery_templates.rb |
foreman_discovery-5.0.1 | db/seeds.d/50_discovery_templates.rb |
foreman_discovery-5.0.0 | db/seeds.d/50_discovery_templates.rb |