foreman_setup 2.1.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee3bba2d86b044aed9a80f8471885ce2beb96d2
|
4
|
+
data.tar.gz: 76c68952a31762eb7acd279cd385fadb00b6cdc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5386c649e2c6c846357bc9684d1742c256f571880060899ba406f597983a4f26bb967854805a436ad188adbcb6477ba30cb3bf9dcb0cc091b7177367d31fb2b7
|
7
|
+
data.tar.gz: f645970ef34860882d09ed6dd0e3b377fa8f3cf6fdddc2450588efd48553da85bc1927fbf19e87ac0f1a54ce4022ad80d4d711bd5669068077b78f100bc2c842
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v3.0.0
|
4
|
+
* show katello-installer commands if Katello is loaded
|
5
|
+
* fix Foreman 1.9 compatibility due to template changes
|
6
|
+
* this version (3.x) drops support for Foreman 1.8 and earlier
|
7
|
+
|
3
8
|
## v2.1.1
|
4
9
|
* fix kickstart template name for RHEL (#8452)
|
5
10
|
|
data/README.md
CHANGED
@@ -16,6 +16,14 @@ installation.
|
|
16
16
|
RPM users can install the "ruby193-rubygem-foreman_setup" or
|
17
17
|
"rubygem-foreman_setup" packages.
|
18
18
|
|
19
|
+
## Compatibility
|
20
|
+
|
21
|
+
| Foreman Version | Plugin Version |
|
22
|
+
| --------------- | --------------:|
|
23
|
+
| <= 1.4 | ~> 1.0 |
|
24
|
+
| >= 1.5 | ~> 2.0 |
|
25
|
+
| >= 1.9 | ~> 3.0 |
|
26
|
+
|
19
27
|
# Areas this should help
|
20
28
|
|
21
29
|
* take input of subnet and domain information
|
@@ -93,7 +93,7 @@ module ForemanSetup
|
|
93
93
|
url.save!
|
94
94
|
|
95
95
|
# Build default PXE menu
|
96
|
-
status, msg =
|
96
|
+
status, msg = ProvisioningTemplate.build_pxe_default(self)
|
97
97
|
warning msg unless status == 200
|
98
98
|
|
99
99
|
@provisioner.hostgroup.medium ||= @provisioner.host.os.media.first
|
@@ -162,7 +162,7 @@ module ForemanSetup
|
|
162
162
|
{'provision' => provision_tmpl_name, 'PXELinux' => tmpl_name, 'iPXE' => ipxe_tmpl_name, 'finish' => finish_tmpl_name}.each do |kind_name, tmpl_name|
|
163
163
|
next if tmpl_name.blank?
|
164
164
|
kind = TemplateKind.find_by_name(kind_name)
|
165
|
-
tmpls =
|
165
|
+
tmpls = ProvisioningTemplate.where('name LIKE ?', "#{tmpl_name}%").where(:template_kind_id => kind.id)
|
166
166
|
tmpls.any? || raise("cannot find template for #{@provisioner.host.os}")
|
167
167
|
|
168
168
|
# prefer foreman_bootdisk templates
|
@@ -172,7 +172,7 @@ module ForemanSetup
|
|
172
172
|
tmpl.save!
|
173
173
|
|
174
174
|
unless @provisioner.host.os.os_default_templates.where(:template_kind_id => kind.id).any?
|
175
|
-
@provisioner.host.os.os_default_templates.build(:template_kind_id => kind.id, :
|
175
|
+
@provisioner.host.os.os_default_templates.build(:template_kind_id => kind.id, :provisioning_template_id => tmpl.id)
|
176
176
|
end
|
177
177
|
end
|
178
178
|
|
@@ -9,41 +9,60 @@
|
|
9
9
|
<h4><%= _("Install provisioning with DHCP") %></h4>
|
10
10
|
<div>
|
11
11
|
<pre>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
--
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<%= provisioner.
|
26
|
-
|
27
|
-
|
28
|
-
|
12
|
+
<% if defined? Katello %>
|
13
|
+
<% command = 'katello-installer' %>
|
14
|
+
<% parameter = 'capsule' %>
|
15
|
+
<% else %>
|
16
|
+
<% command = 'foreman-installer' %>
|
17
|
+
<% parameter = 'foreman-proxy' %>
|
18
|
+
<% end%>
|
19
|
+
<%= command %> \
|
20
|
+
--enable-<%= parameter %> \
|
21
|
+
<%= parameter %>-tftp=true \
|
22
|
+
<%= parameter %>-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
|
23
|
+
<%= parameter %>-dhcp=true \
|
24
|
+
<%= parameter %>-dhcp-interface=<%= provisioner.provision_interface %> \
|
25
|
+
<%= parameter %>-dhcp-gateway=<%= provisioner.subnet.gateway %> \
|
26
|
+
<%= parameter %>-dhcp-range="<%= provisioner.subnet.from %> <%= provisioner.subnet.to %>" \
|
27
|
+
<%= parameter %>-dhcp-nameservers="<%= provisioner.subnet.dns_primary %><%= ("," + provisioner.subnet.dns_secondary) unless provisioner.subnet.dns_secondary.blank? %>" \
|
28
|
+
<%= parameter %>-dns=true \
|
29
|
+
<%= parameter %>-dns-interface=<%= provisioner.provision_interface %> \
|
30
|
+
<%= parameter %>-dns-zone=<%= provisioner.domain.name %> \
|
31
|
+
<%= parameter %>-dns-reverse=<%= provisioner.rdns_zone %> \
|
32
|
+
<%= provisioner.dns_forwarders.map { |f| " #{parameter}-dns-forwarders=#{f} \\" }.join("\n") %>
|
33
|
+
<% if defined? Katello %>
|
34
|
+
<%= parameter %>-parent-fqdn=<%= Setting[:foreman_url] %> \
|
35
|
+
<%= parameter %>-foreman-oauth-key=<%= Setting[:oauth_consumer_key] %> \
|
36
|
+
<%= parameter %>-foreman-oauth-secret=<%= Setting[:oauth_consumer_secret] %>
|
37
|
+
<% else %>
|
38
|
+
<%= parameter %>-foreman-base-url=<%= Setting[:foreman_url] %> \
|
39
|
+
<%= parameter %>-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
|
40
|
+
<%= parameter %>-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
|
41
|
+
<% end %>
|
29
42
|
</pre>
|
30
43
|
</div>
|
31
44
|
|
32
45
|
<h4><%= _("Install provisioning without DHCP") %></h4>
|
33
46
|
<div>
|
34
47
|
<pre>
|
35
|
-
|
36
|
-
--enable
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<%= provisioner.dns_forwarders.map { |f| "
|
44
|
-
|
45
|
-
|
46
|
-
|
48
|
+
<%= command %> \
|
49
|
+
--enable-<%= parameter %> \
|
50
|
+
<%= parameter %>-tftp=true \
|
51
|
+
<%= parameter %>-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
|
52
|
+
<%= parameter %>-dns=true \
|
53
|
+
<%= parameter %>-dns-interface=<%= provisioner.provision_interface %> \
|
54
|
+
<%= parameter %>-dns-zone=<%= provisioner.domain.name %> \
|
55
|
+
<%= parameter %>-dns-reverse=<%= provisioner.rdns_zone %> \
|
56
|
+
<%= provisioner.dns_forwarders.map { |f| " #{parameter}-dns-forwarders=#{f} \\" }.join("\n") %>
|
57
|
+
<% if defined? Katello %>
|
58
|
+
<%= parameter %>-parent-fqdn=<%= Setting[:foreman_url] %> \
|
59
|
+
<%= parameter %>-foreman-oauth-key=<%= Setting[:oauth_consumer_key] %> \
|
60
|
+
<%= parameter %>-foreman-oauth-secret=<%= Setting[:oauth_consumer_secret] %>
|
61
|
+
<% else %>
|
62
|
+
<%= parameter %>-foreman-base-url=<%= Setting[:foreman_url] %> \
|
63
|
+
<%= parameter %>-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
|
64
|
+
<%= parameter %>-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
|
65
|
+
<% end %>
|
47
66
|
</pre>
|
48
67
|
</div>
|
49
68
|
|
data/lib/foreman_setup/engine.rb
CHANGED
@@ -15,7 +15,7 @@ module ForemanSetup
|
|
15
15
|
|
16
16
|
initializer 'foreman_setup.register_plugin', :after=> :finisher_hook do |app|
|
17
17
|
Foreman::Plugin.register :foreman_setup do
|
18
|
-
requires_foreman '
|
18
|
+
requires_foreman '>= 1.9.0'
|
19
19
|
|
20
20
|
menu :top_menu, :provisioners, :url_hash => {:controller=> :'foreman_setup/provisioners', :action=>:index},
|
21
21
|
:caption=> N_('Provisioning setup'),
|
@@ -27,6 +27,10 @@ module ForemanSetup
|
|
27
27
|
:step2, :step2_update, :step3, :step4, :step4_update, :step5] }, :resource_type => "ForemanSetup::Provisioner"
|
28
28
|
end
|
29
29
|
role "Provisioning setup", [:edit_provisioning]
|
30
|
+
|
31
|
+
# we deliberately replace some text on the dashboard page, so this breaks
|
32
|
+
# the test. The setup button ought to be moved somewhere else.
|
33
|
+
tests_to_skip('DashboardTest' => ['dashboard page']) if respond_to? :tests_to_skip
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -111,8 +111,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.2.
|
114
|
+
rubygems_version: 2.2.2
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Helps set up Foreman for provisioning
|
118
118
|
test_files: []
|
119
|
+
has_rdoc:
|