foreman_puppet 5.1.2 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_puppet/locale/ca/foreman_puppet.js +861 -0
  3. data/app/assets/javascripts/foreman_puppet/locale/cs_CZ/foreman_puppet.js +861 -0
  4. data/app/assets/javascripts/foreman_puppet/locale/de/foreman_puppet.js +861 -0
  5. data/app/assets/javascripts/foreman_puppet/locale/en/foreman_puppet.js +861 -0
  6. data/app/assets/javascripts/foreman_puppet/locale/en_GB/foreman_puppet.js +861 -0
  7. data/app/assets/javascripts/foreman_puppet/locale/es/foreman_puppet.js +861 -0
  8. data/app/assets/javascripts/foreman_puppet/locale/fr/foreman_puppet.js +863 -0
  9. data/app/assets/javascripts/foreman_puppet/locale/gl/foreman_puppet.js +861 -0
  10. data/app/assets/javascripts/foreman_puppet/locale/it/foreman_puppet.js +861 -0
  11. data/app/assets/javascripts/foreman_puppet/locale/ja/foreman_puppet.js +859 -0
  12. data/app/assets/javascripts/foreman_puppet/locale/ka/foreman_puppet.js +861 -0
  13. data/app/assets/javascripts/foreman_puppet/locale/ko/foreman_puppet.js +861 -0
  14. data/app/assets/javascripts/foreman_puppet/locale/nl_NL/foreman_puppet.js +861 -0
  15. data/app/assets/javascripts/foreman_puppet/locale/pl/foreman_puppet.js +861 -0
  16. data/app/assets/javascripts/foreman_puppet/locale/pt_BR/foreman_puppet.js +861 -0
  17. data/app/assets/javascripts/foreman_puppet/locale/ru/foreman_puppet.js +861 -0
  18. data/app/assets/javascripts/foreman_puppet/locale/sv_SE/foreman_puppet.js +861 -0
  19. data/app/assets/javascripts/foreman_puppet/locale/zh_CN/foreman_puppet.js +859 -0
  20. data/app/assets/javascripts/foreman_puppet/locale/zh_TW/foreman_puppet.js +861 -0
  21. data/app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb +5 -0
  22. data/app/views/foreman_puppet/environments/welcome.html.erb +3 -3
  23. data/app/views/smart_proxies/plugins/_puppet.html.erb +1 -2
  24. data/lib/foreman_puppet/engine.rb +0 -6
  25. data/lib/foreman_puppet/register.rb +3 -1
  26. data/lib/foreman_puppet/version.rb +1 -1
  27. data/locale/Makefile +6 -3
  28. data/locale/ca/foreman_puppet.edit.po +180 -251
  29. data/locale/ca/foreman_puppet.po +6 -0
  30. data/locale/cs_CZ/foreman_puppet.edit.po +175 -228
  31. data/locale/cs_CZ/foreman_puppet.po +6 -0
  32. data/locale/de/foreman_puppet.edit.po +220 -343
  33. data/locale/de/foreman_puppet.po +6 -0
  34. data/locale/en/foreman_puppet.edit.po +234 -86
  35. data/locale/en/foreman_puppet.po +6 -0
  36. data/locale/en_GB/foreman_puppet.edit.po +169 -214
  37. data/locale/en_GB/foreman_puppet.po +6 -0
  38. data/locale/es/foreman_puppet.edit.po +223 -337
  39. data/locale/es/foreman_puppet.po +6 -0
  40. data/locale/foreman_puppet.pot +31 -22
  41. data/locale/fr/foreman_puppet.edit.po +223 -343
  42. data/locale/fr/foreman_puppet.po +6 -0
  43. data/locale/gl/foreman_puppet.edit.po +171 -224
  44. data/locale/gl/foreman_puppet.po +6 -0
  45. data/locale/it/foreman_puppet.edit.po +188 -266
  46. data/locale/it/foreman_puppet.po +6 -0
  47. data/locale/ja/foreman_puppet.edit.po +190 -251
  48. data/locale/ja/foreman_puppet.po +6 -0
  49. data/locale/ka/foreman_puppet.edit.po +1160 -0
  50. data/locale/ka/foreman_puppet.po +6 -0
  51. data/locale/ko/foreman_puppet.edit.po +171 -217
  52. data/locale/ko/foreman_puppet.po +6 -0
  53. data/locale/nl_NL/foreman_puppet.edit.po +184 -257
  54. data/locale/nl_NL/foreman_puppet.po +6 -0
  55. data/locale/pl/foreman_puppet.edit.po +191 -275
  56. data/locale/pl/foreman_puppet.po +6 -0
  57. data/locale/pt_BR/foreman_puppet.edit.po +227 -349
  58. data/locale/pt_BR/foreman_puppet.po +6 -0
  59. data/locale/ru/foreman_puppet.edit.po +191 -272
  60. data/locale/ru/foreman_puppet.po +6 -0
  61. data/locale/sv_SE/foreman_puppet.edit.po +172 -223
  62. data/locale/sv_SE/foreman_puppet.po +6 -0
  63. data/locale/zh_CN/foreman_puppet.edit.po +192 -241
  64. data/locale/zh_CN/foreman_puppet.po +6 -0
  65. data/locale/zh_TW/foreman_puppet.edit.po +173 -217
  66. data/locale/zh_TW/foreman_puppet.po +6 -0
  67. data/webpack/src/Components/Environments/Welcome.js +1 -1
  68. data/webpack/src/Extends/Host/PuppetTab/SubTabs/ENCPreview/ENCTab.js +4 -1
  69. data/webpack/src/Extends/Host/PuppetTab/index.js +1 -0
  70. metadata +78 -66
  71. data/app/views/provisioning_templates/temp/autoyast_orcharhino_finish.erb +0 -31
  72. data/app/views/provisioning_templates/temp/preseed_orcharhino_finish.erb +0 -90
  73. data/app/views/provisioning_templates/temp/provision/autoyast_orcharhino_default.erb +0 -336
  74. data/app/views/provisioning_templates/temp/snippet/_or_al_client.erb +0 -32
  75. data/app/views/provisioning_templates/temp/snippet/_or_deb_client.erb +0 -175
  76. data/app/views/provisioning_templates/temp/snippet/_or_ol_client.erb +0 -37
  77. data/app/views/provisioning_templates/temp/snippet/_or_sles_client.erb +0 -85
  78. data/locale/messages.mo +0 -0
  79. /data/locale/{en/foreman_puppet.pox → ka/foreman_puppet.po.time_stamp} +0 -0
@@ -148,6 +148,9 @@ msgstr ""
148
148
  msgid "Config Management"
149
149
  msgstr ""
150
150
 
151
+ msgid "Copy to clipboard"
152
+ msgstr ""
153
+
151
154
  msgid "Couldn't find any ENC data for this host"
152
155
  msgstr ""
153
156
 
@@ -721,6 +724,9 @@ msgstr "智慧類別參數"
721
724
  msgid "Some Puppet Classes are unavailable in the selected environment"
722
725
  msgstr ""
723
726
 
727
+ msgid "Successfully copied to clipboard!"
728
+ msgstr ""
729
+
724
730
  msgid "Successfully overridden all parameters of Puppet class %s"
725
731
  msgstr "已成功置換 Puppet 類別 %s 的所有參數"
726
732
 
@@ -37,7 +37,7 @@ export const WelcomeEnv = ({ canCreate }) => {
37
37
  <EmptyState
38
38
  icon="th"
39
39
  iconType="fa"
40
- header={__(' Puppet Environments')}
40
+ header={__('Puppet Environments')}
41
41
  description={description}
42
42
  documentation={{ url: getManualURL('4.2.1Environments') }}
43
43
  action={action}
@@ -6,6 +6,7 @@ import {
6
6
  CodeBlockCode,
7
7
  ClipboardCopyButton,
8
8
  } from '@patternfly/react-core';
9
+ import { translate as __ } from 'foremanReact/common/I18n';
9
10
 
10
11
  export const ENCTab = ({ encData }) => {
11
12
  const [copied, setCopied] = React.useState(false);
@@ -38,7 +39,9 @@ export const ENCTab = ({ encData }) => {
38
39
  maxWidth="110px"
39
40
  variant="plain"
40
41
  >
41
- {copied ? 'Successfully copied to clipboard!' : 'Copy to clipboard'}
42
+ {copied
43
+ ? __('Successfully copied to clipboard!')
44
+ : __('Copy to clipboard')}
42
45
  </ClipboardCopyButton>
43
46
  </CodeBlockAction>
44
47
  );
@@ -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
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: 6.0.0
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-06-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Allow assigning Puppet environments and classes to the Foreman Hosts.
15
15
  email:
@@ -21,6 +21,25 @@ files:
21
21
  - LICENSE
22
22
  - README.md
23
23
  - Rakefile
24
+ - app/assets/javascripts/foreman_puppet/locale/ca/foreman_puppet.js
25
+ - app/assets/javascripts/foreman_puppet/locale/cs_CZ/foreman_puppet.js
26
+ - app/assets/javascripts/foreman_puppet/locale/de/foreman_puppet.js
27
+ - app/assets/javascripts/foreman_puppet/locale/en/foreman_puppet.js
28
+ - app/assets/javascripts/foreman_puppet/locale/en_GB/foreman_puppet.js
29
+ - app/assets/javascripts/foreman_puppet/locale/es/foreman_puppet.js
30
+ - app/assets/javascripts/foreman_puppet/locale/fr/foreman_puppet.js
31
+ - app/assets/javascripts/foreman_puppet/locale/gl/foreman_puppet.js
32
+ - app/assets/javascripts/foreman_puppet/locale/it/foreman_puppet.js
33
+ - app/assets/javascripts/foreman_puppet/locale/ja/foreman_puppet.js
34
+ - app/assets/javascripts/foreman_puppet/locale/ka/foreman_puppet.js
35
+ - app/assets/javascripts/foreman_puppet/locale/ko/foreman_puppet.js
36
+ - app/assets/javascripts/foreman_puppet/locale/nl_NL/foreman_puppet.js
37
+ - app/assets/javascripts/foreman_puppet/locale/pl/foreman_puppet.js
38
+ - app/assets/javascripts/foreman_puppet/locale/pt_BR/foreman_puppet.js
39
+ - app/assets/javascripts/foreman_puppet/locale/ru/foreman_puppet.js
40
+ - app/assets/javascripts/foreman_puppet/locale/sv_SE/foreman_puppet.js
41
+ - app/assets/javascripts/foreman_puppet/locale/zh_CN/foreman_puppet.js
42
+ - app/assets/javascripts/foreman_puppet/locale/zh_TW/foreman_puppet.js
24
43
  - app/assets/stylesheets/foreman_puppet.scss
25
44
  - app/controllers/concerns/foreman_puppet/environments_import.rb
26
45
  - app/controllers/concerns/foreman_puppet/extensions/api_base_controller.rb
@@ -176,13 +195,6 @@ files:
176
195
  - app/views/hosts/select_multiple_puppet_proxy.html.erb
177
196
  - app/views/provisioning_templates/_combination.html.erb
178
197
  - 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
198
  - app/views/smart_proxies/plugins/_puppet.html.erb
187
199
  - config/api_routes.rb
188
200
  - config/initializers/api_reroute.rb
@@ -241,7 +253,6 @@ files:
241
253
  - locale/en/foreman_puppet.edit.po
242
254
  - locale/en/foreman_puppet.po
243
255
  - locale/en/foreman_puppet.po.time_stamp
244
- - locale/en/foreman_puppet.pox
245
256
  - locale/en_GB/LC_MESSAGES/foreman_puppet.mo
246
257
  - locale/en_GB/foreman_puppet.edit.po
247
258
  - locale/en_GB/foreman_puppet.po
@@ -269,12 +280,13 @@ files:
269
280
  - locale/ja/foreman_puppet.po
270
281
  - locale/ja/foreman_puppet.po.time_stamp
271
282
  - locale/ka/LC_MESSAGES/foreman_puppet.mo
283
+ - locale/ka/foreman_puppet.edit.po
272
284
  - locale/ka/foreman_puppet.po
285
+ - locale/ka/foreman_puppet.po.time_stamp
273
286
  - locale/ko/LC_MESSAGES/foreman_puppet.mo
274
287
  - locale/ko/foreman_puppet.edit.po
275
288
  - locale/ko/foreman_puppet.po
276
289
  - locale/ko/foreman_puppet.po.time_stamp
277
- - locale/messages.mo
278
290
  - locale/nl_NL/LC_MESSAGES/foreman_puppet.mo
279
291
  - locale/nl_NL/foreman_puppet.edit.po
280
292
  - locale/nl_NL/foreman_puppet.po
@@ -409,7 +421,7 @@ homepage: https://github.com/theforeman/foreman_puppet
409
421
  licenses:
410
422
  - GPL-3.0
411
423
  metadata: {}
412
- post_install_message:
424
+ post_install_message:
413
425
  rdoc_options: []
414
426
  require_paths:
415
427
  - lib
@@ -424,76 +436,76 @@ required_rubygems_version: !ruby/object:Gem::Requirement
424
436
  - !ruby/object:Gem::Version
425
437
  version: '0'
426
438
  requirements: []
427
- rubygems_version: 3.1.2
428
- signing_key:
439
+ rubygems_version: 3.3.26
440
+ signing_key:
429
441
  specification_version: 4
430
442
  summary: Add Puppet features to Foreman
431
443
  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
444
+ - test/controllers/foreman_puppet/api/v2/config_groups_controller_test.rb
445
+ - test/controllers/foreman_puppet/api/v2/environments_controller_test.rb
446
+ - test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
447
+ - test/controllers/foreman_puppet/api/v2/hostgroup_classes_controller_test.rb
448
+ - test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
449
+ - test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
450
+ - test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
451
+ - test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb
452
+ - test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
453
+ - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
454
+ - test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
455
+ - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
456
+ - test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
457
+ - test/controllers/foreman_puppet/config_groups_controller_test.rb
458
+ - test/controllers/foreman_puppet/environments_controller_test.rb
459
+ - test/controllers/foreman_puppet/hostgroups_controller_test.rb
460
+ - test/controllers/foreman_puppet/hosts_controller_test.rb
461
+ - test/controllers/foreman_puppet/puppet_smart_proxies_controller_test.rb
462
+ - test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
463
+ - test/controllers/foreman_puppet/puppetclasses_controller_test.rb
464
+ - test/controllers/provisioning_templates_controller_test.rb
465
+ - test/factories/foreman_puppet_factories.rb
466
+ - test/factories/host_puppet_enhancements.rb
467
+ - test/factories/proxy_puppet_enhancements.rb
468
+ - test/graphql/mutations/hosts/create_mutation_test.rb
469
+ - test/graphql/queries/environment_query_test.rb
470
+ - test/graphql/queries/environments_query_test.rb
471
+ - test/graphql/queries/host_puppet_query_test.rb
472
+ - test/graphql/queries/hostgroup_puppet_query_test.rb
473
+ - test/graphql/queries/location_query_test.rb
474
+ - test/graphql/queries/organization_query_test.rb
475
+ - test/graphql/queries/puppetclass_query_test.rb
476
+ - test/graphql/queries/puppetclasses_query_test.rb
438
477
  - test/helpers/foreman_puppet/hosts_and_hostgroups_helper_test.rb
478
+ - test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
439
479
  - test/helpers/foreman_puppet/puppetclasses_helper_test.rb
440
480
  - test/integration/foreman_puppet/dashboard_js_test.rb
481
+ - test/integration/foreman_puppet/environment_js_test.rb
441
482
  - test/integration/foreman_puppet/host_js_test.rb
442
483
  - test/integration/foreman_puppet/hostgroup_js_test.rb
443
- - test/integration/foreman_puppet/smartclass_parameter_js_test.rb
444
484
  - 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
485
+ - test/integration/foreman_puppet/smartclass_parameter_js_test.rb
449
486
  - test/integration_puppet_helper.rb
487
+ - test/models/foreman_puppet/config_group_class_test.rb
450
488
  - test/models/foreman_puppet/config_group_test.rb
451
- - test/models/foreman_puppet/report_test.rb
489
+ - test/models/foreman_puppet/environment_test.rb
490
+ - test/models/foreman_puppet/host_config_group_test.rb
452
491
  - test/models/foreman_puppet/host_puppet_facet_test.rb
453
492
  - test/models/foreman_puppet/host_test.rb
454
- - test/models/foreman_puppet/user_test.rb
455
- - test/models/foreman_puppet/provisioning_template_test.rb
456
- - 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
493
  - test/models/foreman_puppet/hostgroup_puppet_facet_test.rb
494
+ - test/models/foreman_puppet/hostgroup_test.rb
495
+ - test/models/foreman_puppet/lookup_value_test.rb
496
+ - test/models/foreman_puppet/provisioning_template_test.rb
460
497
  - test/models/foreman_puppet/puppetclass_lookup_key_test.rb
461
- - test/models/foreman_puppet/environment_test.rb
462
498
  - test/models/foreman_puppet/puppetclass_test.rb
463
- - test/models/foreman_puppet/config_group_class_test.rb
499
+ - test/models/foreman_puppet/report_test.rb
464
500
  - 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
501
+ - test/models/foreman_puppet/user_test.rb
497
502
  - test/services/foreman_puppet/host_counter_test.rb
498
503
  - test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
499
504
  - test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
505
+ - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
506
+ - test/test_puppet_helper.rb
507
+ - test/unit/foreman_puppet/access_permissions_test.rb
508
+ - test/unit/foreman_puppet/global_id_test.rb
509
+ - test/unit/foreman_puppet/puppet_class_importer_test.rb
510
+ - test/unit/foreman_puppet/template_rendering_test.rb
511
+ - test/unit/foreman_puppet_test.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' %>