foreman_ansible 14.2.1 → 15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_ansible/locale/ca/foreman_ansible.js +359 -386
- data/app/assets/javascripts/foreman_ansible/locale/cs_CZ/foreman_ansible.js +443 -470
- data/app/assets/javascripts/foreman_ansible/locale/de/foreman_ansible.js +518 -545
- data/app/assets/javascripts/foreman_ansible/locale/en/foreman_ansible.js +291 -318
- data/app/assets/javascripts/foreman_ansible/locale/en_GB/foreman_ansible.js +317 -344
- data/app/assets/javascripts/foreman_ansible/locale/es/foreman_ansible.js +580 -607
- data/app/assets/javascripts/foreman_ansible/locale/fr/foreman_ansible.js +582 -609
- data/app/assets/javascripts/foreman_ansible/locale/gl/foreman_ansible.js +333 -360
- data/app/assets/javascripts/foreman_ansible/locale/it/foreman_ansible.js +395 -422
- data/app/assets/javascripts/foreman_ansible/locale/ja/foreman_ansible.js +582 -609
- data/app/assets/javascripts/foreman_ansible/locale/ka/foreman_ansible.js +575 -602
- data/app/assets/javascripts/foreman_ansible/locale/ko/foreman_ansible.js +402 -429
- data/app/assets/javascripts/foreman_ansible/locale/nl_NL/foreman_ansible.js +350 -377
- data/app/assets/javascripts/foreman_ansible/locale/pl/foreman_ansible.js +369 -396
- data/app/assets/javascripts/foreman_ansible/locale/pt_BR/foreman_ansible.js +580 -607
- data/app/assets/javascripts/foreman_ansible/locale/ru/foreman_ansible.js +391 -418
- data/app/assets/javascripts/foreman_ansible/locale/sv_SE/foreman_ansible.js +335 -362
- data/app/assets/javascripts/foreman_ansible/locale/zh_CN/foreman_ansible.js +584 -611
- data/app/assets/javascripts/foreman_ansible/locale/zh_TW/foreman_ansible.js +402 -429
- 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/models/ansible_role.rb +3 -0
- data/app/models/ansible_variable.rb +4 -0
- data/app/models/host_ansible_role.rb +6 -0
- 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/capsule_update_-_ansible_default.erb +73 -0
- data/app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb +1 -3
- data/lib/foreman_ansible/engine.rb +4 -10
- data/lib/foreman_ansible/register.rb +1 -1
- data/lib/foreman_ansible/remote_execution.rb +6 -0
- data/lib/foreman_ansible/version.rb +1 -1
- data/locale/ca/foreman_ansible.po +6 -33
- data/locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/cs_CZ/foreman_ansible.po +6 -33
- data/locale/de/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/de/foreman_ansible.po +6 -33
- data/locale/en/foreman_ansible.po +6 -33
- data/locale/en_GB/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/en_GB/foreman_ansible.po +6 -33
- data/locale/es/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/es/foreman_ansible.po +6 -33
- data/locale/foreman_ansible.pot +47 -85
- data/locale/fr/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/fr/foreman_ansible.po +6 -33
- data/locale/gl/foreman_ansible.po +6 -33
- data/locale/it/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/it/foreman_ansible.po +6 -33
- data/locale/ja/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ja/foreman_ansible.po +6 -33
- data/locale/ka/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ka/foreman_ansible.po +6 -33
- data/locale/ko/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ko/foreman_ansible.po +6 -33
- data/locale/nl_NL/foreman_ansible.po +6 -33
- data/locale/pl/foreman_ansible.po +6 -33
- data/locale/pt_BR/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/pt_BR/foreman_ansible.po +6 -33
- data/locale/ru/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ru/foreman_ansible.po +6 -33
- data/locale/sv_SE/foreman_ansible.po +6 -33
- data/locale/zh_CN/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/zh_CN/foreman_ansible.po +6 -33
- data/locale/zh_TW/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/zh_TW/foreman_ansible.po +6 -33
- data/test/functional/ansible_variables_controller_test.rb +1 -1
- data/test/functional/ui_ansible_roles_controller_test.rb +1 -1
- data/test/unit/host_ansible_role_test.rb +30 -0
- data/test/unit/services/ui_roles_importer_test.rb +3 -3
- metadata +26 -12
- data/locale/action_names.rb +0 -7
- /data/app/jobs/{sync_playbooks.rb → import_playbooks_job/async/sync_playbooks.rb} +0 -0
@@ -36,9 +36,6 @@ msgstr ""
|
|
36
36
|
msgid "A comma separated list of tags to use for Ansible run"
|
37
37
|
msgstr ""
|
38
38
|
|
39
|
-
msgid "Action with sub plans"
|
40
|
-
msgstr "有子計畫的動作"
|
41
|
-
|
42
39
|
msgid "Actions"
|
43
40
|
msgstr "動作"
|
44
41
|
|
@@ -141,9 +138,6 @@ msgstr ""
|
|
141
138
|
msgid "Ansible variable override was successfully deleted."
|
142
139
|
msgstr ""
|
143
140
|
|
144
|
-
msgid "Ansible: Run Insights maintenance plan"
|
145
|
-
msgstr ""
|
146
|
-
|
147
141
|
msgid "Are you sure you want to cancel Ansible config job?"
|
148
142
|
msgstr ""
|
149
143
|
|
@@ -183,9 +177,6 @@ msgstr ""
|
|
183
177
|
msgid "Changed Ansible roles"
|
184
178
|
msgstr ""
|
185
179
|
|
186
|
-
msgid "Check for long running tasks"
|
187
|
-
msgstr ""
|
188
|
-
|
189
180
|
msgid "Close"
|
190
181
|
msgstr "關閉"
|
191
182
|
|
@@ -258,9 +249,6 @@ msgstr ""
|
|
258
249
|
msgid "Deletes Ansible variable"
|
259
250
|
msgstr ""
|
260
251
|
|
261
|
-
msgid "Deliver notifications about long running tasks"
|
262
|
-
msgstr ""
|
263
|
-
|
264
252
|
msgid "Description"
|
265
253
|
msgstr "描述"
|
266
254
|
|
@@ -390,15 +378,9 @@ msgstr "若選取而沒有預設值並且比對器未提供值的話,將會造
|
|
390
378
|
msgid "Import"
|
391
379
|
msgstr "匯入"
|
392
380
|
|
393
|
-
msgid "Import Puppet classes"
|
394
|
-
msgstr "匯入 Puppet 類別"
|
395
|
-
|
396
381
|
msgid "Import Role"
|
397
382
|
msgstr ""
|
398
383
|
|
399
|
-
msgid "Import facts"
|
400
|
-
msgstr "匯入詳情"
|
401
|
-
|
402
384
|
msgid "Import from %s"
|
403
385
|
msgstr "由 %s 匯入"
|
404
386
|
|
@@ -435,9 +417,6 @@ msgstr ""
|
|
435
417
|
msgid "Inherited from Hostgroup"
|
436
418
|
msgstr ""
|
437
419
|
|
438
|
-
msgid "Insights remediation on %{hosts_count} host(s) has finished successfully"
|
439
|
-
msgstr ""
|
440
|
-
|
441
420
|
msgid "Invalid, expected one of: %s"
|
442
421
|
msgstr ""
|
443
422
|
|
@@ -447,9 +426,6 @@ msgstr ""
|
|
447
426
|
msgid "Inventory"
|
448
427
|
msgstr ""
|
449
428
|
|
450
|
-
msgid "Job Details"
|
451
|
-
msgstr ""
|
452
|
-
|
453
429
|
msgid "Jobs"
|
454
430
|
msgstr "工作"
|
455
431
|
|
@@ -614,12 +590,6 @@ msgstr ""
|
|
614
590
|
msgid "Proxy tasks batch size for Ansible"
|
615
591
|
msgstr ""
|
616
592
|
|
617
|
-
msgid "Remediation Plan"
|
618
|
-
msgstr ""
|
619
|
-
|
620
|
-
msgid "Remote action:"
|
621
|
-
msgstr "遠端動作:"
|
622
|
-
|
623
593
|
msgid "Remove"
|
624
594
|
msgstr "移除"
|
625
595
|
|
@@ -680,9 +650,6 @@ msgstr ""
|
|
680
650
|
msgid "Run playbook"
|
681
651
|
msgstr ""
|
682
652
|
|
683
|
-
msgid "Runs a given maintenance plan from Red Hat Access Insights given an ID."
|
684
|
-
msgstr ""
|
685
|
-
|
686
653
|
msgid "Runs all Ansible roles on a host"
|
687
654
|
msgstr ""
|
688
655
|
|
@@ -842,6 +809,12 @@ msgstr ""
|
|
842
809
|
msgid "Update"
|
843
810
|
msgstr "更新"
|
844
811
|
|
812
|
+
msgid "Update Capsules on given Capsule server hosts"
|
813
|
+
msgstr ""
|
814
|
+
|
815
|
+
msgid "Update Capsules on given hosts"
|
816
|
+
msgstr ""
|
817
|
+
|
845
818
|
msgid "Update Role Variables"
|
846
819
|
msgstr ""
|
847
820
|
|
@@ -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,
|
@@ -17,4 +17,34 @@ class HostAnsibleRoleTest < ActiveSupport::TestCase
|
|
17
17
|
end
|
18
18
|
should validate_uniqueness_of(:ansible_role_id).scoped_to(:host_id)
|
19
19
|
end
|
20
|
+
|
21
|
+
describe 'auditing' do
|
22
|
+
setup do
|
23
|
+
@host = FactoryBot.create(:host)
|
24
|
+
@ansible_role = FactoryBot.create(:ansible_role)
|
25
|
+
@host_ansible_role = FactoryBot.create(:host_ansible_role, :with_auditing, host_id: @host.id, ansible_role_id: @ansible_role.id)
|
26
|
+
@audits = @host_ansible_role.audits
|
27
|
+
end
|
28
|
+
|
29
|
+
test 'should audit creation of a host ansible role' do
|
30
|
+
assert_equal 1, @audits.size
|
31
|
+
assert_associated_ids
|
32
|
+
assert_equal 'create', @audits.last.action
|
33
|
+
end
|
34
|
+
|
35
|
+
test 'should audit deletion of a host ansible role' do
|
36
|
+
@audits.clear
|
37
|
+
@host_ansible_role.destroy
|
38
|
+
|
39
|
+
assert_equal 1, @audits.size
|
40
|
+
assert_associated_ids
|
41
|
+
assert_equal 'destroy', @audits.last.action
|
42
|
+
end
|
43
|
+
|
44
|
+
def assert_associated_ids
|
45
|
+
audit = @audits.last
|
46
|
+
assert_equal @ansible_role.id, audit.audited_changes['ansible_role_id']
|
47
|
+
assert_equal @host.id, audit.audited_changes['host_id']
|
48
|
+
end
|
49
|
+
end
|
20
50
|
end
|
@@ -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: 2024-
|
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,54 @@ 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
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: theforeman-rubocop
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 0.1.0
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 0.1.0
|
81
95
|
description: Ansible integration with Foreman
|
82
96
|
email:
|
83
97
|
- elobatocs@gmail.com
|
@@ -149,7 +163,7 @@ files:
|
|
149
163
|
- app/helpers/foreman_ansible/ansible_roles_helper.rb
|
150
164
|
- app/helpers/foreman_ansible/hosts_helper.rb
|
151
165
|
- app/helpers/foreman_ansible/smart_proxies_helper.rb
|
152
|
-
- app/jobs/sync_playbooks.rb
|
166
|
+
- app/jobs/import_playbooks_job/async/sync_playbooks.rb
|
153
167
|
- app/jobs/sync_roles_and_variables.rb
|
154
168
|
- app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
|
155
169
|
- app/lib/proxy_api/ansible.rb
|
@@ -217,6 +231,7 @@ files:
|
|
217
231
|
- app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_galaxy.erb
|
218
232
|
- app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_git.erb
|
219
233
|
- app/views/foreman_ansible/job_templates/ansible_windows_updates.erb
|
234
|
+
- app/views/foreman_ansible/job_templates/capsule_update_-_ansible_default.erb
|
220
235
|
- app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb
|
221
236
|
- app/views/foreman_ansible/job_templates/convert_to_rhel.erb
|
222
237
|
- app/views/foreman_ansible/job_templates/download_and_execute_script.erb
|
@@ -264,7 +279,6 @@ files:
|
|
264
279
|
- lib/foreman_ansible/remote_execution.rb
|
265
280
|
- lib/foreman_ansible/version.rb
|
266
281
|
- locale/Makefile
|
267
|
-
- locale/action_names.rb
|
268
282
|
- locale/ca/LC_MESSAGES/foreman_ansible.mo
|
269
283
|
- locale/ca/foreman_ansible.po
|
270
284
|
- locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo
|
data/locale/action_names.rb
DELETED
File without changes
|