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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_ansible/locale/ca/foreman_ansible.js +359 -386
  3. data/app/assets/javascripts/foreman_ansible/locale/cs_CZ/foreman_ansible.js +443 -470
  4. data/app/assets/javascripts/foreman_ansible/locale/de/foreman_ansible.js +518 -545
  5. data/app/assets/javascripts/foreman_ansible/locale/en/foreman_ansible.js +291 -318
  6. data/app/assets/javascripts/foreman_ansible/locale/en_GB/foreman_ansible.js +317 -344
  7. data/app/assets/javascripts/foreman_ansible/locale/es/foreman_ansible.js +580 -607
  8. data/app/assets/javascripts/foreman_ansible/locale/fr/foreman_ansible.js +582 -609
  9. data/app/assets/javascripts/foreman_ansible/locale/gl/foreman_ansible.js +333 -360
  10. data/app/assets/javascripts/foreman_ansible/locale/it/foreman_ansible.js +395 -422
  11. data/app/assets/javascripts/foreman_ansible/locale/ja/foreman_ansible.js +582 -609
  12. data/app/assets/javascripts/foreman_ansible/locale/ka/foreman_ansible.js +575 -602
  13. data/app/assets/javascripts/foreman_ansible/locale/ko/foreman_ansible.js +402 -429
  14. data/app/assets/javascripts/foreman_ansible/locale/nl_NL/foreman_ansible.js +350 -377
  15. data/app/assets/javascripts/foreman_ansible/locale/pl/foreman_ansible.js +369 -396
  16. data/app/assets/javascripts/foreman_ansible/locale/pt_BR/foreman_ansible.js +580 -607
  17. data/app/assets/javascripts/foreman_ansible/locale/ru/foreman_ansible.js +391 -418
  18. data/app/assets/javascripts/foreman_ansible/locale/sv_SE/foreman_ansible.js +335 -362
  19. data/app/assets/javascripts/foreman_ansible/locale/zh_CN/foreman_ansible.js +584 -611
  20. data/app/assets/javascripts/foreman_ansible/locale/zh_TW/foreman_ansible.js +402 -429
  21. data/app/controllers/ansible_roles_controller.rb +1 -1
  22. data/app/controllers/ansible_variables_controller.rb +1 -1
  23. data/app/controllers/api/v2/ansible_roles_controller.rb +1 -1
  24. data/app/controllers/ui_ansible_roles_controller.rb +1 -1
  25. data/app/jobs/sync_roles_and_variables.rb +1 -1
  26. data/app/models/ansible_role.rb +3 -0
  27. data/app/models/ansible_variable.rb +4 -0
  28. data/app/models/host_ansible_role.rb +6 -0
  29. data/app/services/foreman_ansible/api_roles_importer.rb +1 -1
  30. data/app/services/foreman_ansible/ui_roles_importer.rb +1 -1
  31. data/app/views/foreman_ansible/job_templates/capsule_update_-_ansible_default.erb +73 -0
  32. data/app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb +1 -3
  33. data/lib/foreman_ansible/engine.rb +4 -10
  34. data/lib/foreman_ansible/register.rb +1 -1
  35. data/lib/foreman_ansible/remote_execution.rb +6 -0
  36. data/lib/foreman_ansible/version.rb +1 -1
  37. data/locale/ca/foreman_ansible.po +6 -33
  38. data/locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo +0 -0
  39. data/locale/cs_CZ/foreman_ansible.po +6 -33
  40. data/locale/de/LC_MESSAGES/foreman_ansible.mo +0 -0
  41. data/locale/de/foreman_ansible.po +6 -33
  42. data/locale/en/foreman_ansible.po +6 -33
  43. data/locale/en_GB/LC_MESSAGES/foreman_ansible.mo +0 -0
  44. data/locale/en_GB/foreman_ansible.po +6 -33
  45. data/locale/es/LC_MESSAGES/foreman_ansible.mo +0 -0
  46. data/locale/es/foreman_ansible.po +6 -33
  47. data/locale/foreman_ansible.pot +47 -85
  48. data/locale/fr/LC_MESSAGES/foreman_ansible.mo +0 -0
  49. data/locale/fr/foreman_ansible.po +6 -33
  50. data/locale/gl/foreman_ansible.po +6 -33
  51. data/locale/it/LC_MESSAGES/foreman_ansible.mo +0 -0
  52. data/locale/it/foreman_ansible.po +6 -33
  53. data/locale/ja/LC_MESSAGES/foreman_ansible.mo +0 -0
  54. data/locale/ja/foreman_ansible.po +6 -33
  55. data/locale/ka/LC_MESSAGES/foreman_ansible.mo +0 -0
  56. data/locale/ka/foreman_ansible.po +6 -33
  57. data/locale/ko/LC_MESSAGES/foreman_ansible.mo +0 -0
  58. data/locale/ko/foreman_ansible.po +6 -33
  59. data/locale/nl_NL/foreman_ansible.po +6 -33
  60. data/locale/pl/foreman_ansible.po +6 -33
  61. data/locale/pt_BR/LC_MESSAGES/foreman_ansible.mo +0 -0
  62. data/locale/pt_BR/foreman_ansible.po +6 -33
  63. data/locale/ru/LC_MESSAGES/foreman_ansible.mo +0 -0
  64. data/locale/ru/foreman_ansible.po +6 -33
  65. data/locale/sv_SE/foreman_ansible.po +6 -33
  66. data/locale/zh_CN/LC_MESSAGES/foreman_ansible.mo +0 -0
  67. data/locale/zh_CN/foreman_ansible.po +6 -33
  68. data/locale/zh_TW/LC_MESSAGES/foreman_ansible.mo +0 -0
  69. data/locale/zh_TW/foreman_ansible.po +6 -33
  70. data/test/functional/ansible_variables_controller_test.rb +1 -1
  71. data/test/functional/ui_ansible_roles_controller_test.rb +1 -1
  72. data/test/unit/host_ansible_role_test.rb +30 -0
  73. data/test/unit/services/ui_roles_importer_test.rb +3 -3
  74. metadata +26 -12
  75. data/locale/action_names.rb +0 -7
  76. /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::UiRolesImporter.any_instance.
28
+ ForemanAnsible::UIRolesImporter.any_instance.
29
29
  expects(:import_role_names).returns({})
30
30
 
31
31
  get :import,
@@ -1,6 +1,6 @@
1
1
  require 'test_plugin_helper'
2
2
 
3
- class UiAnsibleRolesControllerTest < ActionController::TestCase
3
+ class UIAnsibleRolesControllerTest < ActionController::TestCase
4
4
  setup do
5
5
  @role = FactoryBot.create(:ansible_role)
6
6
  end
@@ -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 UiRolesImporter
5
- class UiRolesImporterTest < ActiveSupport::TestCase
4
+ # unit tests for UIRolesImporter
5
+ class UIRolesImporterTest < ActiveSupport::TestCase
6
6
  setup do
7
7
  changed_roles
8
- @importer = ForemanAnsible::UiRolesImporter.new
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: 14.2.1
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-08-07 00:00:00.000000000 Z
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: '9.0'
47
+ version: '14.0'
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: '14'
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: '9.0'
57
+ version: '14.0'
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '14'
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: '7.0'
67
+ version: '10.0'
68
68
  - - "<"
69
69
  - !ruby/object:Gem::Version
70
- version: '10'
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: '7.0'
77
+ version: '10.0'
78
78
  - - "<"
79
79
  - !ruby/object:Gem::Version
80
- version: '10'
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
@@ -1,7 +0,0 @@
1
- # Autogenerated!
2
- _("Action with sub plans")
3
- _("Check for long running tasks")
4
- _("Deliver notifications about long running tasks")
5
- _("Import Puppet classes")
6
- _("Import facts")
7
- _("Remote action:")