foreman_ansible 14.2.3 → 15.0.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 +4 -4
- data/app/controllers/ansible_roles_controller.rb +1 -1
- data/app/controllers/ansible_variables_controller.rb +1 -1
- data/app/controllers/api/v2/ansible_roles_controller.rb +1 -1
- data/app/controllers/ui_ansible_roles_controller.rb +1 -1
- data/app/jobs/sync_roles_and_variables.rb +1 -1
- data/app/services/foreman_ansible/api_roles_importer.rb +1 -1
- data/app/services/foreman_ansible/ui_roles_importer.rb +1 -1
- data/app/views/foreman_ansible/job_templates/convert_to_rhel.erb +1 -15
- data/lib/foreman_ansible/engine.rb +4 -10
- data/lib/foreman_ansible/register.rb +1 -1
- data/lib/foreman_ansible/version.rb +1 -1
- data/test/functional/ansible_variables_controller_test.rb +1 -1
- data/test/functional/ui_ansible_roles_controller_test.rb +1 -1
- data/test/unit/services/ui_roles_importer_test.rb +3 -3
- metadata +12 -50
- data/locale/ca/foreman_ansible.edit.po +0 -1209
- data/locale/ca/foreman_ansible.po.time_stamp +0 -0
- data/locale/cs_CZ/foreman_ansible.edit.po +0 -1225
- data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
- data/locale/de/foreman_ansible.edit.po +0 -1248
- data/locale/de/foreman_ansible.po.time_stamp +0 -0
- data/locale/en/foreman_ansible.edit.po +0 -1202
- data/locale/en/foreman_ansible.po.time_stamp +0 -0
- data/locale/en_GB/foreman_ansible.edit.po +0 -1220
- data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
- data/locale/es/foreman_ansible.edit.po +0 -1247
- data/locale/es/foreman_ansible.po.time_stamp +0 -0
- data/locale/fr/foreman_ansible.edit.po +0 -1246
- data/locale/fr/foreman_ansible.po.time_stamp +0 -0
- data/locale/gl/foreman_ansible.edit.po +0 -1206
- data/locale/gl/foreman_ansible.po.time_stamp +0 -0
- data/locale/it/foreman_ansible.edit.po +0 -1224
- data/locale/it/foreman_ansible.po.time_stamp +0 -0
- data/locale/ja/foreman_ansible.edit.po +0 -1242
- data/locale/ja/foreman_ansible.po.time_stamp +0 -0
- data/locale/ka/foreman_ansible.edit.po +0 -1227
- data/locale/ka/foreman_ansible.po.time_stamp +0 -0
- data/locale/ko/foreman_ansible.edit.po +0 -1219
- data/locale/ko/foreman_ansible.po.time_stamp +0 -0
- data/locale/nl_NL/foreman_ansible.edit.po +0 -1214
- data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
- data/locale/pl/foreman_ansible.edit.po +0 -1209
- data/locale/pl/foreman_ansible.po.time_stamp +0 -0
- data/locale/pt_BR/foreman_ansible.edit.po +0 -1246
- data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
- data/locale/ru/foreman_ansible.edit.po +0 -1227
- data/locale/ru/foreman_ansible.po.time_stamp +0 -0
- data/locale/sv_SE/foreman_ansible.edit.po +0 -1209
- data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
- data/locale/zh_CN/foreman_ansible.edit.po +0 -1241
- data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
- data/locale/zh_TW/foreman_ansible.edit.po +0 -1220
- data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
- /data/app/jobs/{sync_playbooks.rb → import_playbooks_job/async/sync_playbooks.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5de249140ded5fdd285662ec692ec39aa59c066ca137c0fd64b7907907887969
|
4
|
+
data.tar.gz: 999b39a3daa7333adda1dda9ee5b552ef28879790fa54409ee0d8fb3cea1f969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bfb0de5ef66c6a93bff6e7f7a32ac8fd15ddbb37f12a146f431b3fe98e8289e4b0a192c6fdfd40e0b47c60cda4f6074d392d5f0f0626be5f49ac1e07f8968bd
|
7
|
+
data.tar.gz: abf362e2b9e6db0eccbe238043735ba9e305483ddf39eebf1e235d78c5c39dce1fac034136063bf8ab16430721cb5a43fc546119bb30828af61e0757d1a8da67
|
@@ -46,7 +46,7 @@ class AnsibleRolesController < ::ApplicationController
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def create_importer
|
49
|
-
@importer = ForemanAnsible::
|
49
|
+
@importer = ForemanAnsible::UIRolesImporter.new(@proxy)
|
50
50
|
@variables_importer = ForemanAnsible::VariablesImporter.new(@proxy)
|
51
51
|
end
|
52
52
|
|
@@ -92,7 +92,7 @@ class AnsibleVariablesController < ::LookupKeysController
|
|
92
92
|
|
93
93
|
def create_importer
|
94
94
|
@importer = ForemanAnsible::VariablesImporter.new(@proxy)
|
95
|
-
@importer_roles = ForemanAnsible::
|
95
|
+
@importer_roles = ForemanAnsible::UIRolesImporter.new(@proxy)
|
96
96
|
end
|
97
97
|
|
98
98
|
def find_required_proxy
|
@@ -98,7 +98,7 @@ module Api
|
|
98
98
|
# rubocop:enable Layout/DotPosition
|
99
99
|
|
100
100
|
def create_importer
|
101
|
-
@roles_importer = ForemanAnsible::
|
101
|
+
@roles_importer = ForemanAnsible::UIRolesImporter.new(@proxy)
|
102
102
|
@variables_importer = ForemanAnsible::VariablesImporter.new(@proxy)
|
103
103
|
@importer = ForemanAnsible::ApiRolesImporter.new(@proxy)
|
104
104
|
end
|
@@ -2,7 +2,7 @@ class SyncRolesAndVariables < ::ApplicationJob
|
|
2
2
|
queue_as :default
|
3
3
|
|
4
4
|
def perform(changed, proxy)
|
5
|
-
roles_importer = ForemanAnsible::
|
5
|
+
roles_importer = ForemanAnsible::UIRolesImporter.new(proxy)
|
6
6
|
variables_importer = ForemanAnsible::VariablesImporter.new(proxy)
|
7
7
|
roles_importer.finish_import(changed)
|
8
8
|
variables_importer.import_variables_roles(changed) if changed['new'] || changed['old']
|
@@ -6,7 +6,7 @@ module ForemanAnsible
|
|
6
6
|
include ::ForemanAnsible::AnsibleRolesDataPreparations
|
7
7
|
|
8
8
|
def import!(role_names)
|
9
|
-
@roles_importer = ForemanAnsible::
|
9
|
+
@roles_importer = ForemanAnsible::UIRolesImporter.new(@ansible_proxy)
|
10
10
|
@variables_importer = ForemanAnsible::VariablesImporter.new(@ansible_proxy)
|
11
11
|
params = { 'changed' => {} }
|
12
12
|
roles = prepare_ansible_import_rows(@roles_importer.import!, @variables_importer, false)
|
@@ -20,25 +20,11 @@ template_inputs:
|
|
20
20
|
advanced: false
|
21
21
|
value_type: plain
|
22
22
|
hidden_value: false
|
23
|
-
- name: ELS
|
24
|
-
required: false
|
25
|
-
input_type: user
|
26
|
-
description: Use an Extended Lifecycle Support (ELS) add-on subscription
|
27
|
-
advanced: false
|
28
|
-
value_type: plain
|
29
|
-
options: "yes\r\nno"
|
30
|
-
default: "no"
|
31
|
-
hidden_value: false
|
32
23
|
model: JobTemplate
|
33
24
|
job_category: Convert 2 RHEL
|
34
25
|
provider_type: Ansible
|
35
26
|
kind: job_template
|
36
27
|
%>
|
37
|
-
<%-
|
38
|
-
ack = " --activationkey \"#{input_resource('Activation Key').name}\""
|
39
|
-
org = " --org \"#{@host.organization.label}\""
|
40
|
-
els = input('ELS') == "yes" ? " --els" : ""
|
41
|
-
-%>
|
42
28
|
---
|
43
29
|
- hosts: all
|
44
30
|
environment:
|
@@ -67,7 +53,7 @@ kind: job_template
|
|
67
53
|
- "convert2rhel_version is version('2.0.0', '<')"
|
68
54
|
|
69
55
|
- name: Start convert2rhel
|
70
|
-
command: convert2rhel -y <%=
|
56
|
+
command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>"
|
71
57
|
|
72
58
|
<%- if input('Restart') == "yes" -%>
|
73
59
|
- name: Reboot the machine
|
@@ -11,16 +11,10 @@ module ForemanAnsible
|
|
11
11
|
class Engine < ::Rails::Engine
|
12
12
|
engine_name 'foreman_ansible'
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
config.autoload_paths += Dir["#{config.root}/app/services"]
|
19
|
-
config.autoload_paths += Dir["#{config.root}/app/views"]
|
20
|
-
config.autoload_paths += Dir["#{config.root}/app/lib"]
|
21
|
-
|
22
|
-
initializer 'foreman_ansible.register_plugin', :before => :finisher_hook do
|
23
|
-
require 'foreman_ansible/register'
|
14
|
+
initializer 'foreman_ansible.register_plugin', :before => :finisher_hook do |app|
|
15
|
+
app.reloader.to_prepare do
|
16
|
+
require 'foreman_ansible/register'
|
17
|
+
end
|
24
18
|
end
|
25
19
|
|
26
20
|
initializer('foreman_ansible.require_dynflow',
|
@@ -25,7 +25,7 @@ class AnsibleVariablesControllerTest < ActionController::TestCase
|
|
25
25
|
test 'there are no problems when the import hash is empty' do
|
26
26
|
ForemanAnsible::VariablesImporter.any_instance.
|
27
27
|
expects(:import_variable_names).returns({})
|
28
|
-
ForemanAnsible::
|
28
|
+
ForemanAnsible::UIRolesImporter.any_instance.
|
29
29
|
expects(:import_role_names).returns({})
|
30
30
|
|
31
31
|
get :import,
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'test_plugin_helper'
|
4
|
-
# unit tests for
|
5
|
-
class
|
4
|
+
# unit tests for UIRolesImporter
|
5
|
+
class UIRolesImporterTest < ActiveSupport::TestCase
|
6
6
|
setup do
|
7
7
|
changed_roles
|
8
|
-
@importer = ForemanAnsible::
|
8
|
+
@importer = ForemanAnsible::UIRolesImporter.new
|
9
9
|
end
|
10
10
|
|
11
11
|
test 'should create new role' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 15.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_list
|
@@ -44,40 +44,40 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '14.0'
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '
|
50
|
+
version: '15'
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '
|
57
|
+
version: '14.0'
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '15'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: foreman-tasks
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '10.0'
|
68
68
|
- - "<"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
70
|
+
version: '11'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '10.0'
|
78
78
|
- - "<"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
80
|
+
version: '11'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: theforeman-rubocop
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,7 @@ files:
|
|
163
163
|
- app/helpers/foreman_ansible/ansible_roles_helper.rb
|
164
164
|
- app/helpers/foreman_ansible/hosts_helper.rb
|
165
165
|
- app/helpers/foreman_ansible/smart_proxies_helper.rb
|
166
|
-
- app/jobs/sync_playbooks.rb
|
166
|
+
- app/jobs/import_playbooks_job/async/sync_playbooks.rb
|
167
167
|
- app/jobs/sync_roles_and_variables.rb
|
168
168
|
- app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
|
169
169
|
- app/lib/proxy_api/ansible.rb
|
@@ -280,83 +280,45 @@ files:
|
|
280
280
|
- lib/foreman_ansible/version.rb
|
281
281
|
- locale/Makefile
|
282
282
|
- locale/ca/LC_MESSAGES/foreman_ansible.mo
|
283
|
-
- locale/ca/foreman_ansible.edit.po
|
284
283
|
- locale/ca/foreman_ansible.po
|
285
|
-
- locale/ca/foreman_ansible.po.time_stamp
|
286
284
|
- locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo
|
287
|
-
- locale/cs_CZ/foreman_ansible.edit.po
|
288
285
|
- locale/cs_CZ/foreman_ansible.po
|
289
|
-
- locale/cs_CZ/foreman_ansible.po.time_stamp
|
290
286
|
- locale/de/LC_MESSAGES/foreman_ansible.mo
|
291
|
-
- locale/de/foreman_ansible.edit.po
|
292
287
|
- locale/de/foreman_ansible.po
|
293
|
-
- locale/de/foreman_ansible.po.time_stamp
|
294
288
|
- locale/en/LC_MESSAGES/foreman_ansible.mo
|
295
|
-
- locale/en/foreman_ansible.edit.po
|
296
289
|
- locale/en/foreman_ansible.po
|
297
|
-
- locale/en/foreman_ansible.po.time_stamp
|
298
290
|
- locale/en_GB/LC_MESSAGES/foreman_ansible.mo
|
299
|
-
- locale/en_GB/foreman_ansible.edit.po
|
300
291
|
- locale/en_GB/foreman_ansible.po
|
301
|
-
- locale/en_GB/foreman_ansible.po.time_stamp
|
302
292
|
- locale/es/LC_MESSAGES/foreman_ansible.mo
|
303
|
-
- locale/es/foreman_ansible.edit.po
|
304
293
|
- locale/es/foreman_ansible.po
|
305
|
-
- locale/es/foreman_ansible.po.time_stamp
|
306
294
|
- locale/foreman_ansible.pot
|
307
295
|
- locale/fr/LC_MESSAGES/foreman_ansible.mo
|
308
|
-
- locale/fr/foreman_ansible.edit.po
|
309
296
|
- locale/fr/foreman_ansible.po
|
310
|
-
- locale/fr/foreman_ansible.po.time_stamp
|
311
297
|
- locale/gemspec.rb
|
312
298
|
- locale/gl/LC_MESSAGES/foreman_ansible.mo
|
313
|
-
- locale/gl/foreman_ansible.edit.po
|
314
299
|
- locale/gl/foreman_ansible.po
|
315
|
-
- locale/gl/foreman_ansible.po.time_stamp
|
316
300
|
- locale/it/LC_MESSAGES/foreman_ansible.mo
|
317
|
-
- locale/it/foreman_ansible.edit.po
|
318
301
|
- locale/it/foreman_ansible.po
|
319
|
-
- locale/it/foreman_ansible.po.time_stamp
|
320
302
|
- locale/ja/LC_MESSAGES/foreman_ansible.mo
|
321
|
-
- locale/ja/foreman_ansible.edit.po
|
322
303
|
- locale/ja/foreman_ansible.po
|
323
|
-
- locale/ja/foreman_ansible.po.time_stamp
|
324
304
|
- locale/ka/LC_MESSAGES/foreman_ansible.mo
|
325
|
-
- locale/ka/foreman_ansible.edit.po
|
326
305
|
- locale/ka/foreman_ansible.po
|
327
|
-
- locale/ka/foreman_ansible.po.time_stamp
|
328
306
|
- locale/ko/LC_MESSAGES/foreman_ansible.mo
|
329
|
-
- locale/ko/foreman_ansible.edit.po
|
330
307
|
- locale/ko/foreman_ansible.po
|
331
|
-
- locale/ko/foreman_ansible.po.time_stamp
|
332
308
|
- locale/nl_NL/LC_MESSAGES/foreman_ansible.mo
|
333
|
-
- locale/nl_NL/foreman_ansible.edit.po
|
334
309
|
- locale/nl_NL/foreman_ansible.po
|
335
|
-
- locale/nl_NL/foreman_ansible.po.time_stamp
|
336
310
|
- locale/pl/LC_MESSAGES/foreman_ansible.mo
|
337
|
-
- locale/pl/foreman_ansible.edit.po
|
338
311
|
- locale/pl/foreman_ansible.po
|
339
|
-
- locale/pl/foreman_ansible.po.time_stamp
|
340
312
|
- locale/pt_BR/LC_MESSAGES/foreman_ansible.mo
|
341
|
-
- locale/pt_BR/foreman_ansible.edit.po
|
342
313
|
- locale/pt_BR/foreman_ansible.po
|
343
|
-
- locale/pt_BR/foreman_ansible.po.time_stamp
|
344
314
|
- locale/ru/LC_MESSAGES/foreman_ansible.mo
|
345
|
-
- locale/ru/foreman_ansible.edit.po
|
346
315
|
- locale/ru/foreman_ansible.po
|
347
|
-
- locale/ru/foreman_ansible.po.time_stamp
|
348
316
|
- locale/sv_SE/LC_MESSAGES/foreman_ansible.mo
|
349
|
-
- locale/sv_SE/foreman_ansible.edit.po
|
350
317
|
- locale/sv_SE/foreman_ansible.po
|
351
|
-
- locale/sv_SE/foreman_ansible.po.time_stamp
|
352
318
|
- locale/zh_CN/LC_MESSAGES/foreman_ansible.mo
|
353
|
-
- locale/zh_CN/foreman_ansible.edit.po
|
354
319
|
- locale/zh_CN/foreman_ansible.po
|
355
|
-
- locale/zh_CN/foreman_ansible.po.time_stamp
|
356
320
|
- locale/zh_TW/LC_MESSAGES/foreman_ansible.mo
|
357
|
-
- locale/zh_TW/foreman_ansible.edit.po
|
358
321
|
- locale/zh_TW/foreman_ansible.po
|
359
|
-
- locale/zh_TW/foreman_ansible.po.time_stamp
|
360
322
|
- package.json
|
361
323
|
- test/factories/ansible_proxy.rb
|
362
324
|
- test/factories/ansible_roles.rb
|
@@ -548,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
548
510
|
- !ruby/object:Gem::Version
|
549
511
|
version: '0'
|
550
512
|
requirements: []
|
551
|
-
rubygems_version: 3.
|
513
|
+
rubygems_version: 3.2.3
|
552
514
|
signing_key:
|
553
515
|
specification_version: 4
|
554
516
|
summary: Ansible integration with Foreman (theforeman.org)
|