foreman_ansible 7.1.8 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/foreman_ansible/api/v2/hostgroups_controller_extensions.rb +5 -1
  3. data/app/controllers/foreman_ansible/api/v2/hosts_controller_extensions.rb +3 -1
  4. data/app/helpers/foreman_ansible/ansible_reports_helper.rb +4 -0
  5. data/app/helpers/foreman_ansible/hosts_helper.rb +19 -0
  6. data/app/services/foreman_ansible/variables_importer.rb +9 -9
  7. data/app/views/api/v2/hostgroups/ansible_roles.json.rabl +9 -1
  8. data/app/views/api/v2/hosts/ansible_roles.json.rabl +9 -1
  9. data/lib/foreman_ansible/engine.rb +0 -1
  10. data/lib/foreman_ansible/register.rb +5 -1
  11. data/lib/foreman_ansible/version.rb +1 -1
  12. data/locale/action_names.rb +4 -3
  13. data/locale/ca/foreman_ansible.edit.po +1162 -0
  14. data/locale/ca/foreman_ansible.po +360 -45
  15. data/locale/ca/foreman_ansible.po.time_stamp +0 -0
  16. data/locale/cs_CZ/foreman_ansible.edit.po +1207 -0
  17. data/locale/cs_CZ/foreman_ansible.po +372 -57
  18. data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
  19. data/locale/de/foreman_ansible.edit.po +1148 -0
  20. data/locale/de/foreman_ansible.po +355 -40
  21. data/locale/de/foreman_ansible.po.time_stamp +0 -0
  22. data/locale/en/foreman_ansible.edit.po +1146 -0
  23. data/locale/en/foreman_ansible.po +355 -40
  24. data/locale/en/foreman_ansible.po.time_stamp +0 -0
  25. data/locale/en_GB/foreman_ansible.edit.po +1155 -0
  26. data/locale/en_GB/foreman_ansible.po +357 -42
  27. data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
  28. data/locale/es/foreman_ansible.edit.po +1148 -0
  29. data/locale/es/foreman_ansible.po +355 -40
  30. data/locale/es/foreman_ansible.po.time_stamp +0 -0
  31. data/locale/foreman_ansible.pot +767 -263
  32. data/locale/fr/foreman_ansible.edit.po +1148 -0
  33. data/locale/fr/foreman_ansible.po +355 -40
  34. data/locale/fr/foreman_ansible.po.time_stamp +0 -0
  35. data/locale/gl/foreman_ansible.edit.po +1156 -0
  36. data/locale/gl/foreman_ansible.po +358 -43
  37. data/locale/gl/foreman_ansible.po.time_stamp +0 -0
  38. data/locale/it/foreman_ansible.edit.po +1148 -0
  39. data/locale/it/foreman_ansible.po +355 -40
  40. data/locale/it/foreman_ansible.po.time_stamp +0 -0
  41. data/locale/ja/foreman_ansible.edit.po +1148 -0
  42. data/locale/ja/foreman_ansible.po +355 -40
  43. data/locale/ja/foreman_ansible.po.time_stamp +0 -0
  44. data/locale/ko/foreman_ansible.edit.po +1148 -0
  45. data/locale/ko/foreman_ansible.po +355 -40
  46. data/locale/ko/foreman_ansible.po.time_stamp +0 -0
  47. data/locale/nl_NL/foreman_ansible.edit.po +1168 -0
  48. data/locale/nl_NL/foreman_ansible.po +359 -44
  49. data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
  50. data/locale/pl/foreman_ansible.edit.po +1180 -0
  51. data/locale/pl/foreman_ansible.po +363 -48
  52. data/locale/pl/foreman_ansible.po.time_stamp +0 -0
  53. data/locale/pt_BR/foreman_ansible.edit.po +1148 -0
  54. data/locale/pt_BR/foreman_ansible.po +355 -40
  55. data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
  56. data/locale/ru/foreman_ansible.edit.po +1149 -0
  57. data/locale/ru/foreman_ansible.po +355 -40
  58. data/locale/ru/foreman_ansible.po.time_stamp +0 -0
  59. data/locale/sv_SE/foreman_ansible.edit.po +1180 -0
  60. data/locale/sv_SE/foreman_ansible.po +363 -48
  61. data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
  62. data/locale/zh_CN/foreman_ansible.edit.po +1148 -0
  63. data/locale/zh_CN/foreman_ansible.po +355 -40
  64. data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
  65. data/locale/zh_TW/foreman_ansible.edit.po +1148 -0
  66. data/locale/zh_TW/foreman_ansible.po +355 -40
  67. data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
  68. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTableHelper.js +4 -13
  69. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/__test__/AnsibleVariableOverrides.test.js +1 -3
  70. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig +151 -0
  71. data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js +11 -1
  72. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/EditRolesForm.js +8 -10
  73. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/index.js +1 -1
  74. data/webpack/components/AnsibleHostDetail/components/RolesTab/RolesTable.js +10 -1
  75. data/webpack/components/AnsibleHostDetail/components/RolesTab/__test__/EditRoles.test.js +1 -2
  76. data/webpack/components/AnsibleHostDetail/components/RolesTab/__test__/RolesTab.fixtures.js +30 -0
  77. data/webpack/components/AnsibleHostDetail/components/RolesTab/__test__/RolesTab.test.js +1 -3
  78. data/webpack/components/AnsibleHostDetail/components/RolesTab/index.js +2 -26
  79. data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRole.js +3 -12
  80. data/webpack/components/AnsibleRolesSwitcher/components/OrderedRolesTooltip.js +11 -12
  81. data/webpack/components/AnsibleRolesSwitcher/components/__snapshots__/AnsibleRole.test.js.snap +6 -20
  82. data/webpack/graphql/queries/allAnsibleRoles.gql +3 -0
  83. data/webpack/graphql/queries/hostAnsibleRoles.gql +3 -0
  84. data/webpack/testHelper.js +3 -12
  85. metadata +82 -45
  86. data/app/helpers/foreman_ansible/hosts_helper_extensions.rb +0 -30
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: 7.1.8
4
+ version: 8.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: 2023-08-07 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: foreman_remote_execution
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 7.2.2
47
+ version: 4.4.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 7.2.2
54
+ version: 4.4.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: foreman-tasks
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 6.0.3
61
+ version: 5.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 6.0.3
68
+ version: 5.2.0
69
69
  description: Ansible integration with Foreman
70
70
  email:
71
71
  - elobatocs@gmail.com
@@ -113,7 +113,7 @@ files:
113
113
  - app/helpers/foreman_ansible/ansible_reports_helper.rb
114
114
  - app/helpers/foreman_ansible/ansible_roles_data_preparations.rb
115
115
  - app/helpers/foreman_ansible/ansible_roles_helper.rb
116
- - app/helpers/foreman_ansible/hosts_helper_extensions.rb
116
+ - app/helpers/foreman_ansible/hosts_helper.rb
117
117
  - app/jobs/sync_playbooks.rb
118
118
  - app/jobs/sync_roles_and_variables.rb
119
119
  - app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
@@ -228,43 +228,79 @@ files:
228
228
  - locale/Makefile
229
229
  - locale/action_names.rb
230
230
  - locale/ca/LC_MESSAGES/foreman_ansible.mo
231
+ - locale/ca/foreman_ansible.edit.po
231
232
  - locale/ca/foreman_ansible.po
233
+ - locale/ca/foreman_ansible.po.time_stamp
232
234
  - locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo
235
+ - locale/cs_CZ/foreman_ansible.edit.po
233
236
  - locale/cs_CZ/foreman_ansible.po
237
+ - locale/cs_CZ/foreman_ansible.po.time_stamp
234
238
  - locale/de/LC_MESSAGES/foreman_ansible.mo
239
+ - locale/de/foreman_ansible.edit.po
235
240
  - locale/de/foreman_ansible.po
241
+ - locale/de/foreman_ansible.po.time_stamp
236
242
  - locale/en/LC_MESSAGES/foreman_ansible.mo
243
+ - locale/en/foreman_ansible.edit.po
237
244
  - locale/en/foreman_ansible.po
245
+ - locale/en/foreman_ansible.po.time_stamp
238
246
  - locale/en_GB/LC_MESSAGES/foreman_ansible.mo
247
+ - locale/en_GB/foreman_ansible.edit.po
239
248
  - locale/en_GB/foreman_ansible.po
249
+ - locale/en_GB/foreman_ansible.po.time_stamp
240
250
  - locale/es/LC_MESSAGES/foreman_ansible.mo
251
+ - locale/es/foreman_ansible.edit.po
241
252
  - locale/es/foreman_ansible.po
253
+ - locale/es/foreman_ansible.po.time_stamp
242
254
  - locale/foreman_ansible.pot
243
255
  - locale/fr/LC_MESSAGES/foreman_ansible.mo
256
+ - locale/fr/foreman_ansible.edit.po
244
257
  - locale/fr/foreman_ansible.po
258
+ - locale/fr/foreman_ansible.po.time_stamp
245
259
  - locale/gemspec.rb
246
260
  - locale/gl/LC_MESSAGES/foreman_ansible.mo
261
+ - locale/gl/foreman_ansible.edit.po
247
262
  - locale/gl/foreman_ansible.po
263
+ - locale/gl/foreman_ansible.po.time_stamp
248
264
  - locale/it/LC_MESSAGES/foreman_ansible.mo
265
+ - locale/it/foreman_ansible.edit.po
249
266
  - locale/it/foreman_ansible.po
267
+ - locale/it/foreman_ansible.po.time_stamp
250
268
  - locale/ja/LC_MESSAGES/foreman_ansible.mo
269
+ - locale/ja/foreman_ansible.edit.po
251
270
  - locale/ja/foreman_ansible.po
271
+ - locale/ja/foreman_ansible.po.time_stamp
252
272
  - locale/ko/LC_MESSAGES/foreman_ansible.mo
273
+ - locale/ko/foreman_ansible.edit.po
253
274
  - locale/ko/foreman_ansible.po
275
+ - locale/ko/foreman_ansible.po.time_stamp
254
276
  - locale/nl_NL/LC_MESSAGES/foreman_ansible.mo
277
+ - locale/nl_NL/foreman_ansible.edit.po
255
278
  - locale/nl_NL/foreman_ansible.po
279
+ - locale/nl_NL/foreman_ansible.po.time_stamp
256
280
  - locale/pl/LC_MESSAGES/foreman_ansible.mo
281
+ - locale/pl/foreman_ansible.edit.po
257
282
  - locale/pl/foreman_ansible.po
283
+ - locale/pl/foreman_ansible.po.time_stamp
258
284
  - locale/pt_BR/LC_MESSAGES/foreman_ansible.mo
285
+ - locale/pt_BR/foreman_ansible.edit.po
259
286
  - locale/pt_BR/foreman_ansible.po
287
+ - locale/pt_BR/foreman_ansible.po.time_stamp
260
288
  - locale/ru/LC_MESSAGES/foreman_ansible.mo
289
+ - locale/ru/foreman_ansible.edit.po
261
290
  - locale/ru/foreman_ansible.po
291
+ - locale/ru/foreman_ansible.po.time_stamp
262
292
  - locale/sv_SE/LC_MESSAGES/foreman_ansible.mo
293
+ - locale/sv_SE/foreman_ansible.edit.po
263
294
  - locale/sv_SE/foreman_ansible.po
295
+ - locale/sv_SE/foreman_ansible.po.time_stamp
264
296
  - locale/zh_CN/LC_MESSAGES/foreman_ansible.mo
297
+ - locale/zh_CN/foreman_ansible.edit.po
265
298
  - locale/zh_CN/foreman_ansible.po
299
+ - locale/zh_CN/foreman_ansible.po.time_stamp
266
300
  - locale/zh_TW/LC_MESSAGES/foreman_ansible.mo
301
+ - locale/zh_TW/foreman_ansible.edit.po
267
302
  - locale/zh_TW/foreman_ansible.po
303
+ - locale/zh_TW/foreman_ansible.po.time_stamp
268
304
  - package.json
269
305
  - test/factories/ansible_proxy.rb
270
306
  - test/factories/ansible_roles.rb
@@ -338,6 +374,7 @@ files:
338
374
  - webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.js
339
375
  - webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.scss
340
376
  - webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js
377
+ - webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig
341
378
  - webpack/components/AnsibleHostDetail/components/JobsTab/RecurringJobsTable.js
342
379
  - webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.fixtures.js
343
380
  - webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.test.js
@@ -458,55 +495,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
458
495
  - !ruby/object:Gem::Version
459
496
  version: '0'
460
497
  requirements: []
461
- rubygems_version: 3.1.4
498
+ rubygems_version: 3.3.7
462
499
  signing_key:
463
500
  specification_version: 4
464
501
  summary: Ansible integration with Foreman (theforeman.org)
465
502
  test_files:
466
- - test/factories/ansible_proxy.rb
467
- - test/factories/ansible_roles.rb
468
- - test/factories/ansible_variables.rb
469
- - test/factories/host_ansible_enhancements.rb
470
- - test/fixtures/insights_playbook.yaml
471
- - test/fixtures/playbooks_example_output.json
472
- - test/fixtures/sample_facts.json
473
- - test/fixtures/sample_playbooks.json
474
- - test/fixtures/report.json
475
- - test/foreman_ansible/helpers/ansible_roles_helper_test.rb
476
- - test/functional/ansible_roles_controller_test.rb
477
- - test/functional/ansible_variables_controller_test.rb
478
503
  - test/functional/api/v2/ansible_playbooks_controller_test.rb
504
+ - test/functional/api/v2/hosts_controller_test.rb
479
505
  - test/functional/api/v2/ansible_roles_controller_test.rb
506
+ - test/functional/api/v2/hostgroups_controller_test.rb
480
507
  - test/functional/api/v2/ansible_variables_controller_test.rb
481
508
  - test/functional/api/v2/ansible_inventories_controller_test.rb
482
- - test/functional/api/v2/hostgroups_controller_test.rb
483
- - test/functional/api/v2/hosts_controller_test.rb
484
509
  - test/functional/hosts_controller_test.rb
510
+ - test/functional/ansible_roles_controller_test.rb
511
+ - test/functional/ansible_variables_controller_test.rb
485
512
  - test/functional/ui_ansible_roles_controller_test.rb
486
- - test/graphql/mutations/hosts/assign_ansible_roles_mutation_test.rb
487
- - test/graphql/queries/ansible_roles_query_test.rb
488
- - test/graphql/queries/host_ansible_roles_query_test.rb
489
- - test/test_plugin_helper.rb
513
+ - test/unit/services/inventory_creator_test.rb
514
+ - test/unit/services/ansible_report_importer_test.rb
515
+ - test/unit/services/ui_roles_importer_test.rb
516
+ - test/unit/services/roles_importer_test.rb
517
+ - test/unit/services/ansible_variables_importer_test.rb
518
+ - test/unit/services/override_resolver_test.rb
519
+ - test/unit/services/api_roles_importer_test.rb
520
+ - test/unit/services/insights_plan_runner_test.rb
490
521
  - test/unit/ansible_role_test.rb
491
- - test/unit/ansible_variable_test.rb
492
- - test/unit/concerns/config_reports_extensions_test.rb
493
- - test/unit/concerns/host_managed_extensions_test.rb
494
- - test/unit/concerns/hostgroup_extensions_test.rb
495
- - test/unit/helpers/ansible_reports_helper_test.rb
496
522
  - test/unit/host_ansible_role_test.rb
523
+ - test/unit/import_playbooks_test.rb
497
524
  - test/unit/hostgroup_ansible_role_test.rb
525
+ - test/unit/helpers/ansible_reports_helper_test.rb
526
+ - test/unit/ansible_provider_test.rb
527
+ - test/unit/concerns/host_managed_extensions_test.rb
528
+ - test/unit/concerns/config_reports_extensions_test.rb
529
+ - test/unit/concerns/hostgroup_extensions_test.rb
498
530
  - test/unit/ignore_roles_test.rb
499
- - test/unit/import_playbooks_test.rb
531
+ - test/unit/ansible_variable_test.rb
500
532
  - test/unit/import_roles_and_variables.rb
501
533
  - test/unit/lib/proxy_api/ansible_test.rb
502
- - test/unit/services/ansible_report_importer_test.rb
503
- - test/unit/services/ansible_variables_importer_test.rb
504
- - test/unit/services/api_roles_importer_test.rb
505
- - test/unit/services/insights_plan_runner_test.rb
506
- - test/unit/services/inventory_creator_test.rb
507
- - test/unit/services/override_resolver_test.rb
508
- - test/unit/services/roles_importer_test.rb
509
- - test/unit/services/ui_roles_importer_test.rb
510
534
  - test/unit/actions/run_ansible_job_test.rb
511
535
  - test/unit/actions/run_proxy_ansible_command_test.rb
512
- - test/unit/ansible_provider_test.rb
536
+ - test/foreman_ansible/helpers/ansible_roles_helper_test.rb
537
+ - test/test_plugin_helper.rb
538
+ - test/factories/ansible_proxy.rb
539
+ - test/factories/ansible_variables.rb
540
+ - test/factories/host_ansible_enhancements.rb
541
+ - test/factories/ansible_roles.rb
542
+ - test/fixtures/playbooks_example_output.json
543
+ - test/fixtures/report.json
544
+ - test/fixtures/sample_facts.json
545
+ - test/fixtures/insights_playbook.yaml
546
+ - test/fixtures/sample_playbooks.json
547
+ - test/graphql/mutations/hosts/assign_ansible_roles_mutation_test.rb
548
+ - test/graphql/queries/host_ansible_roles_query_test.rb
549
+ - test/graphql/queries/ansible_roles_query_test.rb
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ForemanAnsible
4
- # Chained methods to extend the hosts menu with Ansible actions
5
- module HostsHelperExtensions
6
- extend ActiveSupport::Concern
7
-
8
- module Overrides
9
- def multiple_actions
10
- actions = super
11
- if User.current.can?(:create_job_invocations) &&
12
- User.current.can?(:play_roles_on_host)
13
- actions += [[_('Run all Ansible roles'),
14
- multiple_play_roles_hosts_path,
15
- false]]
16
- end
17
- actions
18
- end
19
- end
20
-
21
- included do
22
- prepend Overrides
23
- end
24
-
25
- def ansible_roles_present?(host)
26
- host.ansible_roles.present? ||
27
- host.inherited_ansible_roles.present?
28
- end
29
- end
30
- end