foreman_puppet 5.1.2 → 5.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb +5 -0
  3. data/app/views/foreman_puppet/environments/welcome.html.erb +3 -3
  4. data/app/views/foreman_puppet/puppetclasses/_selected_classes.html.erb +6 -1
  5. data/app/views/smart_proxies/plugins/_puppet.html.erb +1 -2
  6. data/lib/foreman_puppet/version.rb +1 -1
  7. data/locale/ca/foreman_puppet.edit.po +180 -251
  8. data/locale/cs_CZ/foreman_puppet.edit.po +175 -228
  9. data/locale/de/foreman_puppet.edit.po +220 -343
  10. data/locale/en/foreman_puppet.edit.po +234 -86
  11. data/locale/en_GB/foreman_puppet.edit.po +169 -214
  12. data/locale/es/foreman_puppet.edit.po +223 -337
  13. data/locale/fr/foreman_puppet.edit.po +223 -343
  14. data/locale/gl/foreman_puppet.edit.po +171 -224
  15. data/locale/it/foreman_puppet.edit.po +188 -266
  16. data/locale/ja/foreman_puppet.edit.po +190 -251
  17. data/locale/ka/foreman_puppet.edit.po +1160 -0
  18. data/locale/ko/foreman_puppet.edit.po +171 -217
  19. data/locale/nl_NL/foreman_puppet.edit.po +184 -257
  20. data/locale/pl/foreman_puppet.edit.po +191 -275
  21. data/locale/pt_BR/foreman_puppet.edit.po +227 -349
  22. data/locale/ru/foreman_puppet.edit.po +191 -272
  23. data/locale/sv_SE/foreman_puppet.edit.po +172 -223
  24. data/locale/zh_CN/foreman_puppet.edit.po +192 -241
  25. data/locale/zh_TW/foreman_puppet.edit.po +173 -217
  26. data/webpack/src/Extends/Host/PuppetTab/index.js +1 -0
  27. data/webpack/src/foreman_puppet_host_form.js +3 -0
  28. metadata +64 -71
  29. data/app/views/provisioning_templates/temp/autoyast_orcharhino_finish.erb +0 -31
  30. data/app/views/provisioning_templates/temp/preseed_orcharhino_finish.erb +0 -90
  31. data/app/views/provisioning_templates/temp/provision/autoyast_orcharhino_default.erb +0 -336
  32. data/app/views/provisioning_templates/temp/snippet/_or_al_client.erb +0 -32
  33. data/app/views/provisioning_templates/temp/snippet/_or_deb_client.erb +0 -175
  34. data/app/views/provisioning_templates/temp/snippet/_or_ol_client.erb +0 -37
  35. data/app/views/provisioning_templates/temp/snippet/_or_sles_client.erb +0 -85
  36. data/locale/messages.mo +0 -0
  37. /data/locale/{en/foreman_puppet.pox → ka/foreman_puppet.po.time_stamp} +0 -0
@@ -13,6 +13,7 @@ const PuppetTab = ({ response, status, location: { pathname } }) => {
13
13
  return (
14
14
  <>
15
15
  <Tabs
16
+ ouiaId="puppet-tabs"
16
17
  className="margin-0-24"
17
18
  onSelect={(evt, subTab) => hashHistory.push(subTab)}
18
19
  isSecondary
@@ -82,6 +82,9 @@ export function updatePuppetclasses(element) {
82
82
  export function reloadPuppetclassParams() {
83
83
  const hostId = $('form.hostresource-form').data('id');
84
84
  const url = $('#puppet_klasses_parameters').data('url');
85
+ if (!url) {
86
+ return;
87
+ }
85
88
  let data = window.serializeForm().replace('method=patch', 'method=post');
86
89
  if (url.match('hostgroups')) {
87
90
  data += `&hostgroup_id=${hostId}`;
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.2
4
+ version: 5.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  - Shira Maximov
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-16 00:00:00.000000000 Z
12
+ date: 2023-09-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Allow assigning Puppet environments and classes to the Foreman Hosts.
15
15
  email:
@@ -176,13 +176,6 @@ files:
176
176
  - app/views/hosts/select_multiple_puppet_proxy.html.erb
177
177
  - app/views/provisioning_templates/_combination.html.erb
178
178
  - app/views/provisioning_templates/_combinations.html.erb
179
- - app/views/provisioning_templates/temp/autoyast_orcharhino_finish.erb
180
- - app/views/provisioning_templates/temp/preseed_orcharhino_finish.erb
181
- - app/views/provisioning_templates/temp/provision/autoyast_orcharhino_default.erb
182
- - app/views/provisioning_templates/temp/snippet/_or_al_client.erb
183
- - app/views/provisioning_templates/temp/snippet/_or_deb_client.erb
184
- - app/views/provisioning_templates/temp/snippet/_or_ol_client.erb
185
- - app/views/provisioning_templates/temp/snippet/_or_sles_client.erb
186
179
  - app/views/smart_proxies/plugins/_puppet.html.erb
187
180
  - config/api_routes.rb
188
181
  - config/initializers/api_reroute.rb
@@ -241,7 +234,6 @@ files:
241
234
  - locale/en/foreman_puppet.edit.po
242
235
  - locale/en/foreman_puppet.po
243
236
  - locale/en/foreman_puppet.po.time_stamp
244
- - locale/en/foreman_puppet.pox
245
237
  - locale/en_GB/LC_MESSAGES/foreman_puppet.mo
246
238
  - locale/en_GB/foreman_puppet.edit.po
247
239
  - locale/en_GB/foreman_puppet.po
@@ -269,12 +261,13 @@ files:
269
261
  - locale/ja/foreman_puppet.po
270
262
  - locale/ja/foreman_puppet.po.time_stamp
271
263
  - locale/ka/LC_MESSAGES/foreman_puppet.mo
264
+ - locale/ka/foreman_puppet.edit.po
272
265
  - locale/ka/foreman_puppet.po
266
+ - locale/ka/foreman_puppet.po.time_stamp
273
267
  - locale/ko/LC_MESSAGES/foreman_puppet.mo
274
268
  - locale/ko/foreman_puppet.edit.po
275
269
  - locale/ko/foreman_puppet.po
276
270
  - locale/ko/foreman_puppet.po.time_stamp
277
- - locale/messages.mo
278
271
  - locale/nl_NL/LC_MESSAGES/foreman_puppet.mo
279
272
  - locale/nl_NL/foreman_puppet.edit.po
280
273
  - locale/nl_NL/foreman_puppet.po
@@ -409,7 +402,7 @@ homepage: https://github.com/theforeman/foreman_puppet
409
402
  licenses:
410
403
  - GPL-3.0
411
404
  metadata: {}
412
- post_install_message:
405
+ post_install_message:
413
406
  rdoc_options: []
414
407
  require_paths:
415
408
  - lib
@@ -424,76 +417,76 @@ required_rubygems_version: !ruby/object:Gem::Requirement
424
417
  - !ruby/object:Gem::Version
425
418
  version: '0'
426
419
  requirements: []
427
- rubygems_version: 3.1.2
428
- signing_key:
420
+ rubygems_version: 3.1.6
421
+ signing_key:
429
422
  specification_version: 4
430
423
  summary: Add Puppet features to Foreman
431
424
  test_files:
432
- - test/unit/foreman_puppet_test.rb
433
- - test/unit/foreman_puppet/global_id_test.rb
434
- - test/unit/foreman_puppet/puppet_class_importer_test.rb
435
- - test/unit/foreman_puppet/template_rendering_test.rb
436
- - test/unit/foreman_puppet/access_permissions_test.rb
437
- - test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
425
+ - test/controllers/foreman_puppet/api/v2/config_groups_controller_test.rb
426
+ - test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
427
+ - test/controllers/foreman_puppet/api/v2/hostgroup_classes_controller_test.rb
428
+ - test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
429
+ - test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
430
+ - test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
431
+ - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
432
+ - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
433
+ - test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
434
+ - test/controllers/foreman_puppet/api/v2/environments_controller_test.rb
435
+ - test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
436
+ - test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
437
+ - test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb
438
+ - test/controllers/foreman_puppet/config_groups_controller_test.rb
439
+ - test/controllers/foreman_puppet/hostgroups_controller_test.rb
440
+ - test/controllers/foreman_puppet/puppet_smart_proxies_controller_test.rb
441
+ - test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
442
+ - test/controllers/foreman_puppet/puppetclasses_controller_test.rb
443
+ - test/controllers/foreman_puppet/environments_controller_test.rb
444
+ - test/controllers/foreman_puppet/hosts_controller_test.rb
445
+ - test/controllers/provisioning_templates_controller_test.rb
446
+ - test/factories/foreman_puppet_factories.rb
447
+ - test/factories/host_puppet_enhancements.rb
448
+ - test/factories/proxy_puppet_enhancements.rb
449
+ - test/graphql/mutations/hosts/create_mutation_test.rb
450
+ - test/graphql/queries/environments_query_test.rb
451
+ - test/graphql/queries/host_puppet_query_test.rb
452
+ - test/graphql/queries/hostgroup_puppet_query_test.rb
453
+ - test/graphql/queries/location_query_test.rb
454
+ - test/graphql/queries/organization_query_test.rb
455
+ - test/graphql/queries/puppetclasses_query_test.rb
456
+ - test/graphql/queries/environment_query_test.rb
457
+ - test/graphql/queries/puppetclass_query_test.rb
438
458
  - test/helpers/foreman_puppet/hosts_and_hostgroups_helper_test.rb
439
459
  - test/helpers/foreman_puppet/puppetclasses_helper_test.rb
460
+ - test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
440
461
  - test/integration/foreman_puppet/dashboard_js_test.rb
441
- - test/integration/foreman_puppet/host_js_test.rb
462
+ - test/integration/foreman_puppet/environment_js_test.rb
442
463
  - test/integration/foreman_puppet/hostgroup_js_test.rb
443
- - test/integration/foreman_puppet/smartclass_parameter_js_test.rb
444
464
  - test/integration/foreman_puppet/puppetclass_js_test.rb
445
- - test/integration/foreman_puppet/environment_js_test.rb
446
- - test/factories/foreman_puppet_factories.rb
447
- - test/factories/host_puppet_enhancements.rb
448
- - test/factories/proxy_puppet_enhancements.rb
449
- - test/integration_puppet_helper.rb
465
+ - test/integration/foreman_puppet/smartclass_parameter_js_test.rb
466
+ - test/integration/foreman_puppet/host_js_test.rb
467
+ - test/models/foreman_puppet/config_group_class_test.rb
450
468
  - test/models/foreman_puppet/config_group_test.rb
451
- - test/models/foreman_puppet/report_test.rb
452
- - test/models/foreman_puppet/host_puppet_facet_test.rb
453
- - test/models/foreman_puppet/host_test.rb
454
- - test/models/foreman_puppet/user_test.rb
455
- - test/models/foreman_puppet/provisioning_template_test.rb
469
+ - test/models/foreman_puppet/environment_test.rb
456
470
  - test/models/foreman_puppet/host_config_group_test.rb
457
- - test/models/foreman_puppet/lookup_value_test.rb
458
- - test/models/foreman_puppet/hostgroup_test.rb
459
471
  - test/models/foreman_puppet/hostgroup_puppet_facet_test.rb
472
+ - test/models/foreman_puppet/hostgroup_test.rb
473
+ - test/models/foreman_puppet/lookup_value_test.rb
460
474
  - test/models/foreman_puppet/puppetclass_lookup_key_test.rb
461
- - test/models/foreman_puppet/environment_test.rb
462
- - test/models/foreman_puppet/puppetclass_test.rb
463
- - test/models/foreman_puppet/config_group_class_test.rb
475
+ - test/models/foreman_puppet/report_test.rb
464
476
  - test/models/foreman_puppet/smart_proxy_test.rb
465
- - test/graphql/queries/hostgroup_puppet_query_test.rb
466
- - test/graphql/queries/puppetclass_query_test.rb
467
- - test/graphql/queries/location_query_test.rb
468
- - test/graphql/queries/organization_query_test.rb
469
- - test/graphql/queries/puppetclasses_query_test.rb
470
- - test/graphql/queries/environment_query_test.rb
471
- - test/graphql/queries/environments_query_test.rb
472
- - test/graphql/queries/host_puppet_query_test.rb
473
- - test/graphql/mutations/hosts/create_mutation_test.rb
474
- - test/test_puppet_helper.rb
475
- - test/controllers/provisioning_templates_controller_test.rb
476
- - test/controllers/foreman_puppet/hostgroups_controller_test.rb
477
- - test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
478
- - test/controllers/foreman_puppet/environments_controller_test.rb
479
- - test/controllers/foreman_puppet/puppet_smart_proxies_controller_test.rb
480
- - test/controllers/foreman_puppet/hosts_controller_test.rb
481
- - test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
482
- - test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
483
- - test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
484
- - test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
485
- - test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
486
- - test/controllers/foreman_puppet/api/v2/environments_controller_test.rb
487
- - test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
488
- - test/controllers/foreman_puppet/api/v2/hostgroup_classes_controller_test.rb
489
- - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
490
- - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
491
- - test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb
492
- - test/controllers/foreman_puppet/api/v2/config_groups_controller_test.rb
493
- - test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
494
- - test/controllers/foreman_puppet/puppetclasses_controller_test.rb
495
- - test/controllers/foreman_puppet/config_groups_controller_test.rb
496
- - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
497
- - test/services/foreman_puppet/host_counter_test.rb
477
+ - test/models/foreman_puppet/user_test.rb
478
+ - test/models/foreman_puppet/provisioning_template_test.rb
479
+ - test/models/foreman_puppet/puppetclass_test.rb
480
+ - test/models/foreman_puppet/host_puppet_facet_test.rb
481
+ - test/models/foreman_puppet/host_test.rb
498
482
  - test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
499
483
  - test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
484
+ - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
485
+ - test/services/foreman_puppet/host_counter_test.rb
486
+ - test/unit/foreman_puppet/access_permissions_test.rb
487
+ - test/unit/foreman_puppet/puppet_class_importer_test.rb
488
+ - test/unit/foreman_puppet/template_rendering_test.rb
489
+ - test/unit/foreman_puppet/global_id_test.rb
490
+ - test/unit/foreman_puppet_test.rb
491
+ - test/test_puppet_helper.rb
492
+ - test/integration_puppet_helper.rb
@@ -1,31 +0,0 @@
1
- <%#
2
- kind: finish
3
- name: AutoYaST orcharhino finish
4
- model: ProvisioningTemplate
5
- oses:
6
- - SLES
7
- -%>
8
- <%
9
- pm_set = @host.puppet_server.present?
10
- puppet_enabled = pm_set || host_param_true?('force-puppet')
11
- salt_enabled = host_param('salt_master').present?
12
- -%>
13
-
14
- /usr/bin/hostnamectl set-hostname <%= @host.name %>
15
-
16
- <%= snippet 'or_sles_client' %>
17
-
18
- <%= snippet('remote_execution_ssh_keys') %>
19
-
20
- <%= snippet "blacklist_kernel_modules" %>
21
-
22
- <% if puppet_enabled -%>
23
- <%= snippet 'puppet_setup' %>
24
- <% end -%>
25
-
26
- <% if salt_enabled %>
27
- <%= snippet 'saltstack_setup' %>
28
- <% end -%>
29
-
30
- <%= snippet 'eject_cdrom' -%>
31
- <%= snippet 'built' %>
@@ -1,90 +0,0 @@
1
- <%#
2
- kind: finish
3
- name: Preseed orcharhino finish
4
- model: ProvisioningTemplate
5
- oses:
6
- - Debian
7
- - Ubuntu
8
- %>
9
-
10
- export DEBIAN_FRONTEND=noninteractive
11
-
12
- <% if @host.provision_method == 'image' -%>
13
- <%# Cloud instances frequently have incorrect hosts data %>
14
- <%= snippet 'fix_hosts' %>
15
- <% end -%>
16
-
17
- <% if @host.operatingsystem.name == "Ubuntu" && @host.operatingsystem.major.to_i > 20 || (@host.operatingsystem.major.to_i == 20 && @host.operatingsystem.minor.to_i >= 3) -%>
18
- <%# Set hostname for Ubuntu Autoinstall %>
19
- hostnamectl set-hostname <%= @host.name %>
20
- <% end -%>
21
-
22
- <%
23
- pm_set = @host.puppet_server.present?
24
- puppet_enabled = pm_set || host_param_true?('force-puppet')
25
- salt_enabled = host_param('salt_master').present?
26
- chef_enabled = @host.respond_to?(:chef_proxy) && @host.chef_proxy
27
- apt_install = 'apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install'
28
- %>
29
-
30
- <% subnet = @host.subnet -%>
31
- <% if subnet.respond_to?(:dhcp_boot_mode?) -%>
32
- <% dhcp = subnet.dhcp_boot_mode? && !@static -%>
33
- <% else -%>
34
- <% dhcp = !@static -%>
35
- <% end -%>
36
- <%= snippet_if_exists(template_name + " custom pre") -%>
37
- <% unless dhcp -%>
38
- # host and domain name need setting as these values may have come from dhcp if pxe booting
39
- /bin/sed -i "s/^search.*$/search <%= @host.domain %>/g" /etc/resolv.conf
40
- /bin/sed -i "s/.*dns-search.*/\tdns-search <%= @host.domain %>/g" /etc/network/interfaces
41
- /bin/sed -i "s/^<%= @host.ip %>.*/<%= @host.ip %>\t<%= @host.shortname %>.<%= @host.domain %>\t<%= @host.shortname %>/g" /etc/hosts
42
- /bin/echo <%= @host.shortname %> > /etc/hostname
43
- /bin/hostname <%= @host.shortname %>.<%= @host.domain %>
44
- <% end -%>
45
-
46
- <%= snippet_if_exists(template_name + " custom snippet") %>
47
- <% if host_enc['parameters']['realm'] && @host.realm && @host.realm.realm_type == 'FreeIPA' -%>
48
- <%= snippet 'freeipa_register' %>
49
- <% end -%>
50
-
51
- <%= snippet 'or_deb_client' %>
52
-
53
- <%= snippet('remote_execution_ssh_keys') %>
54
-
55
- <%= snippet "blacklist_kernel_modules" %>
56
-
57
- <%= snippet_if_exists(template_name + " custom post") -%>
58
-
59
- <% unless host_param('kernel_parameters').nil? -%>
60
- # Allow overriding the default kernel parameters
61
- sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=".*"/GRUB_CMDLINE_LINUX_DEFAULT="<%= host_param('kernel_parameters') %>"/g' /etc/default/grub && update-grub
62
-
63
- <% end -%>
64
- <% if chef_enabled %>
65
- <%= snippet 'chef_client' %>
66
- <% end -%>
67
-
68
- <% if puppet_enabled %>
69
- <% if @host.operatingsystem.name != "Ubuntu" %>
70
- <% if host_param_true?('enable-puppetlabs-repo') || host_param_true?('enable-puppetlabs-puppet6-repo') || host_param_true?('enable-puppetlabs-puppet5-repo') -%>
71
- <%= snippet 'puppetlabs_repo' %>
72
- <% end -%>
73
- <% end -%>
74
- <%= snippet 'puppet_setup' %>
75
- <% end -%>
76
-
77
- <% if salt_enabled %>
78
- <%= snippet 'saltstack_setup' %>
79
- <% end -%>
80
-
81
- <%= snippet 'preseed_networking_setup' %>
82
- <%= snippet 'efibootmgr_netboot' %>
83
-
84
- <%= apt_install %> openssh-client
85
- sed -i -e "/PermitRootLogin/d" /etc/ssh/sshd_config
86
- echo "PermitRootLogin Yes" >> /etc/ssh/sshd_config
87
- systemctl restart sshd
88
-
89
- <%= snippet 'eject_cdrom' -%>
90
- <%= snippet 'built' %>
@@ -1,336 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <%#
3
- kind: provision
4
- name: AutoYaST orcharhino default
5
- model: ProvisioningTemplate
6
- oses:
7
- - SLES
8
- -%>
9
- <%
10
- os_major = @host.operatingsystem.major.to_i
11
- os_minor = @host.operatingsystem.minor.to_i
12
- pm_set = @host.puppet_server.present?
13
- puppet_enabled = pm_set || host_param_true?('force-puppet')
14
- salt_enabled = host_param('salt_master').present?
15
-
16
- primary_interface_identifier = @host.primary_interface.identifier.blank? ? 'eth0' : @host.primary_interface.identifier
17
- primary_interface_subnet = @host.primary_interface.subnet
18
- -%>
19
- <!DOCTYPE profile>
20
- <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
21
- <general>
22
- <mode>
23
- <confirm config:type="boolean">false</confirm>
24
- <final_reboot config:type="boolean">true</final_reboot>
25
- </mode>
26
- </general>
27
- <networking>
28
- <dns>
29
- <hostname><%= @host.name %></hostname>
30
- <% unless primary_interface_subnet.dhcp_boot_mode? -%>
31
- <dhcp_hostname config:type="boolean">false</dhcp_hostname>
32
- <% if os_major < 12 -%>
33
- <dhcp_resolv config:type="boolean">false</dhcp_resolv>
34
- <% end -%>
35
- <% if @host.domain -%>
36
- <domain><%= @host.domain -%></domain>
37
- <% end -%>
38
- <% if primary_interface_subnet.dns_primary.present? -%>
39
- <nameservers config:type="list">
40
- <nameserver><%= primary_interface_subnet.dns_primary -%></nameserver>
41
- <% if primary_interface_subnet.dns_secondary.present? -%>
42
- <nameserver><%= primary_interface_subnet.dns_secondary -%></nameserver>
43
- <% end -%>
44
- </nameservers>
45
- <% end -%>
46
- <% else -%>
47
- <resolv_conf_policy>auto</resolv_conf_policy>
48
- <% end -%>
49
- <% if @host.domain -%>
50
- <searchlist config:type="list">
51
- <search><%= @host.domain %></search>
52
- </searchlist>
53
- <% end -%>
54
- </dns>
55
- <interfaces config:type="list">
56
- <%
57
- @host.managed_interfaces.each do |interface|
58
- next if !interface.managed? || interface.subnet.nil? || interface.ip.nil?
59
- dhcp = interface.subnet.dhcp_boot_mode?
60
- -%>
61
- <% if dhcp -%>
62
- <interface>
63
- <bootproto>dhcp</bootproto>
64
- <device><%= interface.primary ? primary_interface_identifier : interface.identifier -%></device>
65
- <startmode>auto</startmode>
66
- <usercontrol>no</usercontrol>
67
- </interface>
68
- <% else -%>
69
- <interface>
70
- <bootproto>static</bootproto>
71
- <device><%= interface.primary ? primary_interface_identifier : interface.identifier -%></device>
72
- <ipaddr><%= interface.ip -%></ipaddr>
73
- <netmask><%= interface.subnet.mask -%></netmask>
74
- <startmode>onboot</startmode>
75
- <usercontrol>no</usercontrol>
76
- </interface>
77
- <% end -%>
78
- <% end -%>
79
- </interfaces>
80
- <% unless primary_interface_subnet.dhcp_boot_mode? -%>
81
- <routing>
82
- <routes config:type="list">
83
- <route>
84
- <destination>default</destination>
85
- <device><%= primary_interface_identifier -%></device>
86
- <gateway><%= primary_interface_subnet.gateway -%></gateway>
87
- <netmask><%= primary_interface_subnet.mask -%></netmask>
88
- </route>
89
- </routes>
90
- </routing>
91
- <% end -%>
92
- </networking>
93
- <% if host_param('http-proxy') -%>
94
- <proxy>
95
- <enabled config:type="boolean">true</enabled>
96
- <http_proxy>http://<%= host_param('http-proxy') %>:<%= host_param('http-proxy-port') %></http_proxy>
97
- <https_proxy>http://<%= host_param('http-proxy') %>:<%= host_param('http-proxy-port') %></https_proxy>
98
- <% if host_param('noproxy') -%>
99
- <no_proxy>localhost 127.0.0.1 <%= host_param('http-proxy') %> <%= host_param('noproxy') %></no_proxy>
100
- <% else -%>
101
- <no_proxy>localhost 127.0.0.1 <%= host_param('http-proxy') %></no_proxy>
102
- <% end -%>
103
- </proxy>
104
- <% end -%>
105
- <% if os_major >= 15 -%>
106
- <ntp-client>
107
- <ntp_policy>auto</ntp_policy>
108
- <ntp_servers config:type="list">
109
- <ntp_server>
110
- <address><%= host_param('ntp-server') || '0.opensuse.pool.ntp.org' %></address>
111
- <iburst config:type="boolean">false</iburst>
112
- <offline config:type="boolean">true</offline>
113
- </ntp_server>
114
- </ntp_servers>
115
- <ntp_sync>15</ntp_sync>
116
- </ntp-client>
117
- <% else -%>
118
- <ntp-client>
119
- <configure_dhcp config:type="boolean">false</configure_dhcp>
120
- <peers config:type="list">
121
- <peer>
122
- <address><%= host_param('ntp-server') || '0.opensuse.pool.ntp.org' %></address>
123
- <initial_sync config:type="boolean">true</initial_sync>
124
- <options></options>
125
- <type>server</type>
126
- </peer>
127
- </peers>
128
- <start_at_boot config:type="boolean">true</start_at_boot>
129
- <start_in_chroot config:type="boolean">true</start_in_chroot>
130
- </ntp-client>
131
- <% end -%>
132
- <% if ! @dynamic -%>
133
- <%= @host.diskLayout %>
134
- <% end -%>
135
- <% if os_major >= 15 -%>
136
- <services-manager>
137
- <default_target>multi-user</default_target>
138
- <services>
139
- <enable config:type="list">
140
- <service>sshd</service>
141
- </enable>
142
- </services>
143
- </services-manager>
144
- <% else -%>
145
- <runlevel>
146
- <default>3</default>
147
- <services config:type="list">
148
- <service>
149
- <service_name>sshd</service_name>
150
- <service_status>enable</service_status>
151
- </service>
152
- </services>
153
- </runlevel>
154
- <% end -%>
155
- <software>
156
- <% if os_major >= 15 -%>
157
- <products config:type="list">
158
- <product>SLES</product>
159
- </products>
160
- <patterns config:type="list">
161
- <pattern>enhanced_base</pattern>
162
- </patterns>
163
- <% else -%>
164
- <patterns config:type="list">
165
- <pattern>base</pattern>
166
- <% if os_major >= 14 -%>
167
- <pattern>enhanced_base</pattern>
168
- <pattern>sw_management</pattern>
169
- <pattern>yast2_basis</pattern>
170
- <% end -%>
171
- </patterns>
172
- <% end -%>
173
- <packages config:type="list">
174
- <package>lsb-release</package>
175
- <package>openssh</package>
176
- </packages>
177
- </software>
178
- <% if host_param('http-proxy') -%>
179
- <sysconfig config:type="list" >
180
- <sysconfig_entry>
181
- <sysconfig_key>PROXY_ENABLED</sysconfig_key>
182
- <sysconfig_path>/etc/sysconfig/proxy</sysconfig_path>
183
- <sysconfig_value>yes</sysconfig_value>
184
- </sysconfig_entry>
185
- <sysconfig_entry>
186
- <sysconfig_key>HTTPS_PROXY</sysconfig_key>
187
- <sysconfig_path>/etc/sysconfig/proxy</sysconfig_path>
188
- <sysconfig_value>http://<%= host_param('http-proxy') %>:<%= host_param('http-proxy-port') %></sysconfig_value>
189
- </sysconfig_entry>
190
- <sysconfig_entry>
191
- <sysconfig_key>HTTP_PROXY</sysconfig_key>
192
- <sysconfig_path>/etc/sysconfig/proxy</sysconfig_path>
193
- <sysconfig_value>http://<%= host_param('http-proxy') %>:<%= host_param('http-proxy-port') %></sysconfig_value>
194
- </sysconfig_entry>
195
- <sysconfig_entry>
196
- <sysconfig_key>GOPHER_PROXY</sysconfig_key>
197
- <sysconfig_path>/etc/sysconfig/proxy</sysconfig_path>
198
- <sysconfig_value>http://<%= host_param('http-proxy') %>:3128</sysconfig_value>
199
- </sysconfig_entry>
200
- <sysconfig_entry>
201
- <sysconfig_key>NO_PROXY</sysconfig_key>
202
- <sysconfig_path>/etc/sysconfig/proxy</sysconfig_path>
203
- <% if host_param('noproxy') -%>
204
- <sysconfig_value>localhost, 127.0.0.1, <%= host_param('http-proxy') %>, <%= host_param('noproxy').split(' ').join(', ') %></sysconfig_value>
205
- <% else -%>
206
- <sysconfig_value>localhost, 127.0.0.1 </sysconfig_value>
207
- <% end -%>
208
- </sysconfig_entry>
209
- </sysconfig>
210
- <% end -%>
211
- <users config:type="list">
212
- <user>
213
- <username>root</username>
214
- <encrypted config:type="boolean">true</encrypted>
215
- <fullname>root</fullname>
216
- <gid>0</gid>
217
- <home>/root</home>
218
- <shell>/bin/bash</shell>
219
- <uid>0</uid>
220
- <user_password><%= root_pass %></user_password>
221
- </user>
222
- </users>
223
- <scripts>
224
- <% if @dynamic -%>
225
- <pre-scripts config:type="list">
226
- <script>
227
- <debug config:type="boolean">true</debug>
228
- <filename>pre_disklayout</filename>
229
- <interpreter>shell</interpreter>
230
- <source><![CDATA[
231
- <%= @host.diskLayout %>
232
- ]]>
233
- </source>
234
- </script>
235
- </pre-scripts>
236
- <% end -%>
237
- <chroot-scripts config:type="list">
238
- <script>
239
- <filename>cp-resolv.sh</filename>
240
- <chrooted config:type="boolean">false</chrooted>
241
- <interpreter>shell</interpreter>
242
- <notification>Copying resolv.conf into chroot ...</notification>
243
- <source><![CDATA[
244
- cp /etc/resolv.conf /mnt/etc
245
- ]]>
246
- </source>
247
- </script>
248
- <script>
249
- <filename>foreman.sh</filename>
250
- <chrooted config:type="boolean">true</chrooted>
251
- <interpreter>shell</interpreter>
252
- <notification>Setting up Foreman ...</notification>
253
- <source><![CDATA[
254
- /bin/hostname <%= @host.name %>
255
-
256
- <%= snippet 'eject_cdrom' -%>
257
- <%= snippet 'built' %>
258
-
259
- rm /etc/resolv.conf
260
- ]]>
261
- </source>
262
- </script>
263
- </chroot-scripts>
264
-
265
- <init-scripts config:type="list">
266
- <script>
267
- <filename>post-foreman.sh</filename>
268
- <source><![CDATA[
269
-
270
- <% if host_param('http-proxy') -%>
271
- export http_proxy="http://<%= host_param('http-proxy') %>:<%= host_param('http-proxy-port') %>"
272
- <% if host_param('noproxy') -%>
273
- export no_proxy="<%= host_param('http-proxy') %> <%= host_param('noproxy') %>"
274
- <% end -%>
275
- <% end -%>
276
-
277
- <%= snippet 'or_sles_client' %>
278
-
279
- <%= snippet('remote_execution_ssh_keys') %>
280
-
281
- <%= snippet "blacklist_kernel_modules" %>
282
-
283
- <% if puppet_enabled -%>
284
- <%= snippet 'puppet_setup' %>
285
- <% end -%>
286
-
287
- <% if salt_enabled %>
288
- <%= snippet 'saltstack_setup' %>
289
- <% end -%>
290
- ]]>
291
- </source>
292
- </script>
293
- </init-scripts>
294
- </scripts>
295
- <% if os_major >= 15 -%>
296
- <firewall>
297
- <enable_firewall config:type="boolean">true</enable_firewall>
298
- <log_denied_packets>off</log_denied_packets>
299
- <default_zone>public</default_zone>
300
- <zones config:type="list">
301
- <zone>
302
- <name>public</name>
303
- <services config:type="list">
304
- <service>ssh</service>
305
- <service>dhcpv6-client</service>
306
- </services>
307
- </zone>
308
- </zones>
309
- </firewall>
310
- <% end -%>
311
- <keyboard>
312
- <keymap>english-us</keymap>
313
- </keyboard>
314
- <timezone>
315
- <hwclock>UTC</hwclock>
316
- <timezone><%= host_param('time-zone') || 'Etc/UTC' %></timezone>
317
- </timezone>
318
- <add-on>
319
- <add_on_products config:type="list">
320
- <% if os_major >= 15 -%>
321
- <listentry>
322
- <media_url><%= host_param('sle-module-basesystem-url') %></media_url>
323
- <product_dir>/Module-Basesystem</product_dir>
324
- <product>sle-module-basesystem</product>
325
- </listentry>
326
- <% if os_minor >= 1 and os_minor < 4 -%>
327
- <listentry>
328
- <media_url><%= host_param('sle-module-basesystem-url') %></media_url>
329
- <product_dir>/Module-Python2</product_dir>
330
- <product>sle-module-python2</product>
331
- </listentry>
332
- <% end -%>
333
- <% end -%>
334
- </add_on_products>
335
- </add-on>
336
- </profile>