foreman_ipxe 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +63 -0
- data/.travis.yml +33 -3
- data/Gemfile +2 -0
- data/README.md +81 -2
- data/app/controllers/concerns/foreman_ipxe/unattended_controller_extensions.rb +76 -0
- data/app/models/concerns/foreman_ipxe/operatingsystem_extensions.rb +10 -3
- data/app/models/setting/ipxe.rb +25 -0
- data/app/services/foreman_ipxe/ipxe_message_renderer.rb +19 -0
- data/app/services/foreman_ipxe/ipxe_stub_renderer.rb +19 -0
- data/foreman_ipxe.gemspec +5 -8
- data/lib/foreman_ipxe/engine.rb +18 -3
- data/lib/foreman_ipxe/version.rb +3 -1
- data/lib/foreman_ipxe.rb +2 -0
- data/lib/tasks/foreman_ipxe_tasks.rake +37 -0
- metadata +20 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d6b0acc3adbccdc5259b52d8843a8dc658fed064c06f6e2904791c90444822c4
|
4
|
+
data.tar.gz: 4a4a13198eb1b7a0d6837b21a48ecb6a7e9de8a47ecd364cbdb18df1f72b81ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ac724a5b17329600276dc29c3f16833cebaaf4e97c26007c63a070234f8601b678d6a3b8e1836ac247b3b62dac9b05591828074ec269a697fb6a28d8b5dd8fd
|
7
|
+
data.tar.gz: 37cdea5e26cbb5f7a4c72fadd52857c157e742da3f8035577f7799409f20cdda046a828e99a524f0ca451cb283f892ca1656e8d62a619683b2c116ec6faee0aa
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.3
|
4
|
+
TargetRailsVersion: 5.1
|
5
|
+
Exclude:
|
6
|
+
- 'Rakefile'
|
7
|
+
|
8
|
+
Rails:
|
9
|
+
Enabled: true
|
10
|
+
|
11
|
+
# Don't enforce documentation
|
12
|
+
Style/Documentation:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Metrics/LineLength:
|
16
|
+
Max: 250
|
17
|
+
|
18
|
+
Style/WordArray:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Style/SymbolArray:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/RegexpLiteral:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Lint/BooleanSymbol:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Metrics/AbcSize:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
Metrics/MethodLength:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Metrics/CyclomaticComplexity:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Metrics/PerceivedComplexity:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Style/FormatStringToken:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Performance/FixedSize:
|
46
|
+
Exclude:
|
47
|
+
- 'test/**/*'
|
48
|
+
|
49
|
+
Metrics/BlockLength:
|
50
|
+
ExcludedMethods: ['describe', 'context']
|
51
|
+
Exclude:
|
52
|
+
- 'config/routes.rb'
|
53
|
+
- 'lib/foreman_ipxe/engine.rb'
|
54
|
+
- 'test/**/*'
|
55
|
+
|
56
|
+
Metrics/ClassLength:
|
57
|
+
Max: 200
|
58
|
+
Exclude:
|
59
|
+
- 'test/**/*'
|
60
|
+
|
61
|
+
Style/ClassAndModuleChildren:
|
62
|
+
Exclude:
|
63
|
+
- 'test/**/*'
|
data/.travis.yml
CHANGED
@@ -1,5 +1,35 @@
|
|
1
|
-
sudo: false
|
2
1
|
language: ruby
|
3
2
|
rvm:
|
4
|
-
- 2.
|
5
|
-
|
3
|
+
- 2.3
|
4
|
+
install:
|
5
|
+
- unset BUNDLE_GEMFILE
|
6
|
+
- cd ..
|
7
|
+
- git clone https://github.com/theforeman/foreman.git -b ${FOREMAN_CORE_BRANCH} --depth 1
|
8
|
+
- cd ${FOREMAN_PLUGIN_NAME}
|
9
|
+
- bundle install --jobs=3 --retry=3
|
10
|
+
- cd ../foreman
|
11
|
+
- echo "gemspec :path => '../${FOREMAN_PLUGIN_NAME}'" > bundler.d/${FOREMAN_PLUGIN_NAME}.local.rb
|
12
|
+
- ln -s settings.yaml.test config/settings.yaml
|
13
|
+
- ln -s database.yml.example config/database.yml
|
14
|
+
- bundle install --jobs=3 --retry=3 --without journald development postgresql mysql2 console journald
|
15
|
+
- bundle exec rake db:migrate RAILS_ENV=test
|
16
|
+
script:
|
17
|
+
- cd ../${FOREMAN_PLUGIN_NAME}
|
18
|
+
- bundle exec rubocop
|
19
|
+
- cd ../foreman
|
20
|
+
- bundle exec rake test:${FOREMAN_PLUGIN_NAME}
|
21
|
+
env:
|
22
|
+
global:
|
23
|
+
- TESTOPTS=-v
|
24
|
+
- FOREMAN_PLUGIN_NAME=foreman_ipxe
|
25
|
+
matrix:
|
26
|
+
- FOREMAN_CORE_BRANCH=1.18-stable
|
27
|
+
- FOREMAN_CORE_BRANCH=1.19-stable
|
28
|
+
addons:
|
29
|
+
apt:
|
30
|
+
packages:
|
31
|
+
- nodejs
|
32
|
+
- git
|
33
|
+
- libsqlite3-dev
|
34
|
+
- zlib1g-dev
|
35
|
+
- libvirt-dev
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,88 @@
|
|
1
|
-
#
|
1
|
+
# Foreman iPXE
|
2
2
|
|
3
3
|
Adds in PXE loaders for chainloaded iPXE (`undionly.kpxe`, `ipxe.efi`)
|
4
4
|
|
5
|
+
This is useful for when you want to selectively chainload specific hosts into iPXE without affecting all other machines with the same OS.
|
6
|
+
|
5
7
|
|
6
8
|
## Installation
|
7
9
|
|
8
10
|
Follow the Foreman manual for [advanced installation from gems](https://theforeman.org/plugins/#2.3AdvancedInstallationfromGems)
|
9
11
|
|
12
|
+
For full usage of this plugin, you might want to create at least a global default iPXE boot template.
|
13
|
+
You can also specify a local boot template if need be, though in the case one is missing then a default template will be rendered that just closes iPXE and lets BIOS/UEFI continue the boot with the next device.
|
14
|
+
|
15
|
+
## Compatibility
|
16
|
+
|
17
|
+
| Foreman Version | Plugin Version |
|
18
|
+
| --------------- | --------------:|
|
19
|
+
| >= 1.14 | ~> 0.1 |
|
20
|
+
| >= 1.18 | ~> 0.2 |
|
10
21
|
|
11
22
|
## Usage
|
12
23
|
|
24
|
+
### Global
|
25
|
+
|
26
|
+
This plugin adds global iPXE templates for hosts, if your DHCP is set up to always boot iPXE on all hosts - or hosts have iPXE embedded as their boot software.
|
27
|
+
|
28
|
+
You'll need to create a global default template for iPXE to support this feature, an example given below;
|
29
|
+
|
30
|
+
```erb
|
31
|
+
<%#
|
32
|
+
kind: iPXE
|
33
|
+
model: ProvisioningTemplate
|
34
|
+
name: iPXE global default
|
35
|
+
snippet: false
|
36
|
+
-%>
|
37
|
+
#!ipxe
|
38
|
+
|
39
|
+
set menu-default local
|
40
|
+
set menu-timeout 5000
|
41
|
+
|
42
|
+
:start
|
43
|
+
menu iPXE global boot menu
|
44
|
+
item --key l local Continue local boot
|
45
|
+
item shell Drop into iPXE shell
|
46
|
+
item reboot Reboot system
|
47
|
+
item
|
48
|
+
item --key d discovery Foreman Discovery
|
49
|
+
choose --timeout ${menu-timeout} --default ${menu-default} selected || goto cancel
|
50
|
+
set menu-timeout 0
|
51
|
+
goto ${selected}
|
52
|
+
|
53
|
+
:cancel
|
54
|
+
echo Menu canceled, dropping to shell
|
55
|
+
|
56
|
+
:shell
|
57
|
+
echo Use the command 'exit' to return to menu
|
58
|
+
shell
|
59
|
+
set menu-timeout 0
|
60
|
+
goto start
|
61
|
+
|
62
|
+
:failed
|
63
|
+
echo Boot failed, dropping to shell
|
64
|
+
goto shell
|
65
|
+
|
66
|
+
:reboot
|
67
|
+
reboot
|
68
|
+
|
69
|
+
:local
|
70
|
+
exit
|
71
|
+
|
72
|
+
:discovery
|
73
|
+
dhcp
|
74
|
+
kernel ${next-server}/boot/fdi-image/vmlinuz0 rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset proxy.url=<%= foreman_server_url %> proxy.type=foreman BOOTIF=01-${net0/mac}
|
75
|
+
initrd ${next-server}/boot/fdi-image/initrd0.img
|
76
|
+
boot || goto failed
|
77
|
+
goto start
|
78
|
+
```
|
79
|
+
|
80
|
+
If you need to set a host-specific iPXE template, you can set the host parameter `iPXE_Template` to the name of the template that should be rendered for it.
|
81
|
+
|
82
|
+
### Chainloading
|
83
|
+
|
84
|
+
#### Without DHCP setup
|
85
|
+
|
13
86
|
To use the chainloading, you need to generate the iPXE executables first.
|
14
87
|
|
15
88
|
```sh
|
@@ -29,10 +102,16 @@ make bin-x86_64-efi/ipxe.efi EMBED=default.ipxe
|
|
29
102
|
|
30
103
|
The generated executables should then be uploaded to the root of your TFTP server (or depending on your root path DHCP option).
|
31
104
|
|
105
|
+
#### With DHCP setup
|
106
|
+
|
107
|
+
Install the officially available iPXE executables (`undionly.kpxe`, `ipxe.efi`) into your TFTP server, then follow the [iPXE guide for "breaking the loop"](http://ipxe.org/howto/chainloading#breaking_the_loop_with_the_dhcp_server).
|
108
|
+
|
109
|
+
You want to add a rule that passes the bootfile "https://foreman.example.com/unattended/iPXE" to any client reporting in as user class "iPXE".
|
110
|
+
|
32
111
|
|
33
112
|
## Contributing
|
34
113
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
114
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ananace/foreman_ipxe
|
36
115
|
|
37
116
|
|
38
117
|
## License
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ForemanIpxe
|
4
|
+
module UnattendedControllerExtensions
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
IPXE_TEMPLATE_PARAMETER = 'iPXE_Template'
|
8
|
+
|
9
|
+
module Overrides
|
10
|
+
def render_template(type)
|
11
|
+
return super(type) unless ipxe_request?(type)
|
12
|
+
|
13
|
+
@host ||= find_host_by_spoof || find_host_by_token || find_host_by_ip_or_mac
|
14
|
+
|
15
|
+
ipxe_template_kind = TemplateKind.find_by(name: 'iPXE')
|
16
|
+
|
17
|
+
# rubocop:disable Style/SafeNavigation
|
18
|
+
if !@host
|
19
|
+
name = ProvisioningTemplate.global_template_name_for('iPXE', self)
|
20
|
+
template = ProvisioningTemplate.find_global_default_template(name, 'iPXE')
|
21
|
+
|
22
|
+
unless template
|
23
|
+
render_ipxe_message(message: _("Global iPXE template '%s' not found") % name)
|
24
|
+
return
|
25
|
+
end
|
26
|
+
elsif @host && !@host.build?
|
27
|
+
return unless verify_found_host
|
28
|
+
|
29
|
+
name = Setting[:local_boot_iPXE] || ProvisioningTemplate.local_boot_name(:iPXE)
|
30
|
+
template = ProvisioningTemplate.find_by(name: name, template_kind: ipxe_template_kind)
|
31
|
+
template ||= ProvisioningTemplate.new(
|
32
|
+
name: 'iPXE default local boot fallback',
|
33
|
+
template: ForemanIpxe::IpxeStubRenderer.new(
|
34
|
+
message: 'iPXE default local boot fallback'
|
35
|
+
).to_s
|
36
|
+
)
|
37
|
+
elsif @host && @host.host_params[IPXE_TEMPLATE_PARAMETER]
|
38
|
+
name = @host.host_params[IPXE_TEMPLATE_PARAMETER]
|
39
|
+
template = ProvisioningTemplate.find_by(name: name, template_kind: ipxe_template_kind)
|
40
|
+
|
41
|
+
unless template
|
42
|
+
render_ipxe_message(message: _("iPXE template '%s' specified via a host parameter not found") % name)
|
43
|
+
return
|
44
|
+
end
|
45
|
+
end
|
46
|
+
# rubocop:enable Style/SafeNavigation
|
47
|
+
|
48
|
+
return safe_render(template) if template
|
49
|
+
|
50
|
+
return unless verify_found_host
|
51
|
+
return unless allowed_to_install?
|
52
|
+
load_template_vars
|
53
|
+
|
54
|
+
super
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
included do
|
59
|
+
prepend Overrides
|
60
|
+
|
61
|
+
skip_before_action :get_host_details, if: -> { ipxe_request?(params[:kind]) }
|
62
|
+
skip_before_action :allowed_to_install?, if: -> { ipxe_request?(params[:kind]) }
|
63
|
+
skip_before_action :load_template_vars, if: -> { ipxe_request?(params[:kind]) }
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def ipxe_request?(type)
|
69
|
+
%w[iPXE gPXE].include?(type)
|
70
|
+
end
|
71
|
+
|
72
|
+
def render_ipxe_message(message: _('An error occured.'), status: :not_found)
|
73
|
+
render(plain: ForemanIpxe::IpxeMessageRenderer.new(message: message).to_s, status: status, content_type: 'text/plain')
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -1,13 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ForemanIpxe
|
2
4
|
module OperatingsystemExtensions
|
3
5
|
extend ActiveSupport::Concern
|
4
6
|
|
5
7
|
module ClassMethods
|
6
|
-
def all_loaders_map(
|
7
|
-
super
|
8
|
-
.merge('iPXE BIOS' => 'undionly.kpxe', 'iPXE UEFI' => 'ipxe.efi')
|
8
|
+
def all_loaders_map(*args)
|
9
|
+
super
|
10
|
+
.merge('iPXE Chain BIOS' => 'undionly.kpxe', 'iPXE Chain UEFI' => 'ipxe.efi', 'iPXE' => nil)
|
9
11
|
.freeze
|
10
12
|
end
|
13
|
+
|
14
|
+
def boot_filename(host = nil)
|
15
|
+
return host.foreman_url('iPXE') if host.pxe_loader == 'iPXE'
|
16
|
+
super(host)
|
17
|
+
end
|
11
18
|
end
|
12
19
|
end
|
13
20
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Setting
|
4
|
+
class Ipxe < ::Setting
|
5
|
+
def self.load_defaults
|
6
|
+
return unless ActiveRecord::Base.connection.table_exists?('settings')
|
7
|
+
return unless super
|
8
|
+
|
9
|
+
templates = proc { Hash[ProvisioningTemplate.unscoped.of_kind('iPXE').map { |tmpl| [tmpl.name, tmpl.name] }] }
|
10
|
+
|
11
|
+
Setting.transaction do
|
12
|
+
[
|
13
|
+
set('global_iPXE', N_('Global default iPXE template.'), ProvisioningTemplate.global_default_name('iPXE'), N_('Global default iPXE template'), nil, collection: templates),
|
14
|
+
set('local_boot_iPXE', N_('Template that will be selected as iPXE default for local boot.'), ProvisioningTemplate.local_boot_name('iPXE'), N_('Local boot iPXE template'), nil, collection: templates)
|
15
|
+
].compact.each { |s| Setting::Provisioning.create s.update(category: 'Setting::Provisioning') }
|
16
|
+
end
|
17
|
+
|
18
|
+
true
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.humanized_category
|
22
|
+
N_('iPXE')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ForemanIpxe
|
4
|
+
class IpxeMessageRenderer
|
5
|
+
attr_accessor :message
|
6
|
+
|
7
|
+
def initialize(message: nil)
|
8
|
+
@message = message
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_s
|
12
|
+
<<~MESSAGE
|
13
|
+
#!ipxe
|
14
|
+
echo #{message}
|
15
|
+
shell
|
16
|
+
MESSAGE
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ForemanIpxe
|
4
|
+
class IpxeStubRenderer
|
5
|
+
attr_accessor :message
|
6
|
+
|
7
|
+
def initialize(message: 'Deliberately empty iPXE template')
|
8
|
+
@message = message
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_s
|
12
|
+
<<~MESSAGE
|
13
|
+
#!ipxe
|
14
|
+
# #{message}
|
15
|
+
exit
|
16
|
+
MESSAGE
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/foreman_ipxe.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'foreman_ipxe/version'
|
3
|
+
require "#{File.expand_path('lib', __dir__)}/foreman_ipxe/version"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'foreman_ipxe'
|
@@ -12,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
12
10
|
|
13
11
|
spec.summary = 'Adds chainloaded iPXE loaders'
|
14
12
|
spec.description = 'Allows provisioning iPXE with chainloaded iPXE binaries'
|
15
|
-
spec.homepage = 'https://github.com/
|
13
|
+
spec.homepage = 'https://github.com/ananace/foreman_ipxe'
|
16
14
|
spec.license = 'MIT'
|
17
15
|
|
18
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
@@ -20,7 +18,6 @@ Gem::Specification.new do |spec|
|
|
20
18
|
end
|
21
19
|
spec.require_paths = ['lib']
|
22
20
|
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency '
|
25
|
-
spec.add_development_dependency 'minitest', '~> 5.0'
|
21
|
+
spec.add_development_dependency 'rdoc'
|
22
|
+
spec.add_development_dependency 'rubocop', '0.52.1'
|
26
23
|
end
|
data/lib/foreman_ipxe/engine.rb
CHANGED
@@ -1,17 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ForemanIpxe
|
2
4
|
class Engine < ::Rails::Engine
|
3
5
|
engine_name 'foreman_ipxe'
|
4
6
|
|
7
|
+
config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
|
8
|
+
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
|
9
|
+
config.autoload_paths += Dir["#{config.root}/app/services"]
|
10
|
+
|
11
|
+
initializer 'foreman_ipxe.load_default_settings', before: :load_config_initializers do
|
12
|
+
require_dependency File.expand_path('../../app/models/setting/ipxe.rb', __dir__) if begin
|
13
|
+
Setting.table_exists?
|
14
|
+
rescue StandardError
|
15
|
+
(false)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
5
19
|
initializer 'foreman_ipxe.register_plugin', before: :finisher_hook do |_app|
|
6
20
|
Foreman::Plugin.register :foreman_ipxe do
|
7
|
-
requires_foreman '>= 1.
|
21
|
+
requires_foreman '>= 1.18'
|
8
22
|
end
|
9
23
|
end
|
10
24
|
|
11
25
|
config.to_prepare do
|
12
26
|
begin
|
13
|
-
::Operatingsystem.send
|
14
|
-
|
27
|
+
::Operatingsystem.send(:include, ForemanIpxe::OperatingsystemExtensions)
|
28
|
+
::UnattendedController.send(:include, ForemanIpxe::UnattendedControllerExtensions)
|
29
|
+
rescue StandardError => e
|
15
30
|
Rails.logger.warn "ForemanIpxe: skipping engine hook(#{e})"
|
16
31
|
end
|
17
32
|
end
|
data/lib/foreman_ipxe/version.rb
CHANGED
data/lib/foreman_ipxe.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
# Tests
|
6
|
+
namespace :test do
|
7
|
+
desc 'Test ForemanIpxe'
|
8
|
+
Rake::TestTask.new(:foreman_ipxe) do |t|
|
9
|
+
test_dir = File.join(File.dirname(__FILE__), '../..', 'test')
|
10
|
+
t.libs << ['test', test_dir]
|
11
|
+
t.pattern = "#{test_dir}/**/*_test.rb"
|
12
|
+
t.verbose = true
|
13
|
+
t.warning = false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
namespace :foreman_ipxe do
|
18
|
+
task :rubocop do
|
19
|
+
begin
|
20
|
+
require 'rubocop/rake_task'
|
21
|
+
RuboCop::RakeTask.new(:rubocop_foreman_ipxe) do |task|
|
22
|
+
task.patterns = ["#{ForemanIpxe::Engine.root}/app/**/*.rb",
|
23
|
+
"#{ForemanIpxe::Engine.root}/lib/**/*.rb",
|
24
|
+
"#{ForemanIpxe::Engine.root}/test/**/*.rb"]
|
25
|
+
end
|
26
|
+
rescue StandardError
|
27
|
+
puts 'Rubocop not loaded.'
|
28
|
+
end
|
29
|
+
|
30
|
+
Rake::Task['rubocop_foreman_ipxe'].invoke
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
Rake::Task[:test].enhance ['test:foreman_ipxe']
|
35
|
+
|
36
|
+
load 'tasks/jenkins.rake'
|
37
|
+
Rake::Task['jenkins:unit'].enhance ['test:foreman_ipxe', 'foreman_ipxe:rubocop'] if Rake::Task.task_defined?(:'jenkins:unit')
|
metadata
CHANGED
@@ -1,57 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ipxe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Olofsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rdoc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.52.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: minitest
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '5.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '5.0'
|
40
|
+
version: 0.52.1
|
55
41
|
description: Allows provisioning iPXE with chainloaded iPXE binaries
|
56
42
|
email:
|
57
43
|
- alexander.olofsson@liu.se
|
@@ -60,17 +46,23 @@ extensions: []
|
|
60
46
|
extra_rdoc_files: []
|
61
47
|
files:
|
62
48
|
- ".gitignore"
|
49
|
+
- ".rubocop.yml"
|
63
50
|
- ".travis.yml"
|
64
51
|
- Gemfile
|
65
52
|
- LICENSE.txt
|
66
53
|
- README.md
|
67
54
|
- Rakefile
|
55
|
+
- app/controllers/concerns/foreman_ipxe/unattended_controller_extensions.rb
|
68
56
|
- app/models/concerns/foreman_ipxe/operatingsystem_extensions.rb
|
57
|
+
- app/models/setting/ipxe.rb
|
58
|
+
- app/services/foreman_ipxe/ipxe_message_renderer.rb
|
59
|
+
- app/services/foreman_ipxe/ipxe_stub_renderer.rb
|
69
60
|
- foreman_ipxe.gemspec
|
70
61
|
- lib/foreman_ipxe.rb
|
71
62
|
- lib/foreman_ipxe/engine.rb
|
72
63
|
- lib/foreman_ipxe/version.rb
|
73
|
-
|
64
|
+
- lib/tasks/foreman_ipxe_tasks.rake
|
65
|
+
homepage: https://github.com/ananace/foreman_ipxe
|
74
66
|
licenses:
|
75
67
|
- MIT
|
76
68
|
metadata: {}
|
@@ -90,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
82
|
version: '0'
|
91
83
|
requirements: []
|
92
84
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.6
|
85
|
+
rubygems_version: 2.7.6
|
94
86
|
signing_key:
|
95
87
|
specification_version: 4
|
96
88
|
summary: Adds chainloaded iPXE loaders
|