Sha256: 334e98d668c2a6e7b5b3e90958e531044b3893a08b3cb0258e5af783032f1187
Contents?: true
Size: 593 Bytes
Versions: 3
Compression:
Stored size: 593 Bytes
Contents
kind = TemplateKind.find_or_create_by_name('kexec') ProvisioningTemplate.without_auditing do content = File.read(File.join(ForemanDiscovery::Engine.root, 'app', 'views', 'foreman_discovery', 'redhat_kexec.erb')) tmpl = ProvisioningTemplate.find_or_create_by_name( :name => 'Discovery Red Hat kexec', :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-4.1.2 | db/seeds.d/50_discovery_templates.rb |
foreman_discovery-4.1.1 | db/seeds.d/50_discovery_templates.rb |
foreman_discovery-4.1.0 | db/seeds.d/50_discovery_templates.rb |