foreman_bootdisk 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +3 -0
- data/db/migrate/20140522185700_change_templatekind_to_bootdisk.rb +17 -0
- data/db/seeds.rb +4 -2
- data/lib/bootdisk/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968b38fc3cb43d0f3e0f10a7f16cfba11b377934
|
4
|
+
data.tar.gz: 30f4b625448bd5dfd994c5d98bd364d5210cbc79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca59150ae4a72cf99707eb4dcbb874156a153a8bb97f734a51d55e0ee51d218d50502a698f3dd433719aa2cf2ffdce1f5dc034d045a9c28db2143a0cf1fd3326
|
7
|
+
data.tar.gz: a8166ebf290dac36437b9f366214d8f2946f0ed6d095795c0ed63c8dfb6bf26ead386000a158c72538fd6248bffdd94149a1361b98671a54ef397f7ec6dde8de
|
data/CHANGES.md
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
class ChangeTemplatekindToBootdisk < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
kind = TemplateKind.find_or_create_by_name('Bootdisk')
|
4
|
+
ConfigTemplate.unscoped.where('name LIKE ? OR name = ? OR name = ?', '%Boot disk%',
|
5
|
+
Setting[:bootdisk_host_template], Setting[:bootdisk_generic_host_template]).each do |tmpl|
|
6
|
+
tmpl.update_attribute(:template_kind_id, kind.id)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.down
|
11
|
+
old_kind = TemplateKind.find_by_name('Bootdisk')
|
12
|
+
new_kind = TemplateKind.find_by_name('iPXE')
|
13
|
+
if old_kind.present? && new_kind.present?
|
14
|
+
ConfigTemplate.unscoped.where(:template_kind_id => old_kind.id).update_all(:template_kind_id => new_kind.id)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/db/seeds.rb
CHANGED
@@ -3,11 +3,13 @@ def format_errors(model = nil)
|
|
3
3
|
model.errors.full_messages.join(';')
|
4
4
|
end
|
5
5
|
|
6
|
+
kind = TemplateKind.find_or_create_by_name('Bootdisk')
|
7
|
+
|
6
8
|
ConfigTemplate.without_auditing do
|
7
9
|
content = File.read(File.join(Bootdisk::Engine.root, 'app', 'views', 'bootdisk', 'host.erb'))
|
8
10
|
ConfigTemplate.find_or_create_by_name(
|
9
11
|
:name => 'Boot disk iPXE - host',
|
10
|
-
:template_kind_id =>
|
12
|
+
:template_kind_id => kind.id,
|
11
13
|
:snippet => false,
|
12
14
|
:template => content
|
13
15
|
).update_attribute(:template, content)
|
@@ -15,7 +17,7 @@ ConfigTemplate.without_auditing do
|
|
15
17
|
content = File.read(File.join(Bootdisk::Engine.root, 'app', 'views', 'bootdisk', 'generic_host.erb'))
|
16
18
|
ConfigTemplate.find_or_create_by_name(
|
17
19
|
:name => 'Boot disk iPXE - generic host',
|
18
|
-
:template_kind_id =>
|
20
|
+
:template_kind_id => kind.id,
|
19
21
|
:snippet => false,
|
20
22
|
:template => content
|
21
23
|
).update_attribute(:template, content)
|
data/lib/bootdisk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_bootdisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts
|
14
14
|
without the need for PXE infrastructure.
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- db/migrate/20130915133321_create_kickstart_bootdisk_template.rb
|
43
43
|
- db/migrate/20130915201457_create_generic_host_bootdisk_template.rb
|
44
44
|
- db/migrate/20131021095100_edit_host_bootdisk_template_dns_secondary.rb
|
45
|
+
- db/migrate/20140522185700_change_templatekind_to_bootdisk.rb
|
45
46
|
- db/seeds.rb
|
46
47
|
- lib/bootdisk/engine.rb
|
47
48
|
- lib/bootdisk/version.rb
|