foreman_ansible 7.0.4 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/ansible_playbooks_controller.rb +66 -0
  3. data/app/controllers/foreman_ansible/api/v2/hostgroups_controller_extensions.rb +5 -1
  4. data/app/controllers/foreman_ansible/api/v2/hosts_controller_extensions.rb +3 -1
  5. data/app/graphql/presenters/ansible_role_presenter.rb +4 -0
  6. data/app/graphql/types/ansible_role.rb +1 -0
  7. data/app/graphql/types/inherited_ansible_role.rb +4 -0
  8. data/app/helpers/foreman_ansible/hosts_helper.rb +19 -0
  9. data/app/jobs/sync_playbooks.rb +25 -0
  10. data/app/lib/proxy_api/ansible.rb +13 -0
  11. data/app/services/foreman_ansible/import_playbooks_error_notification.rb +38 -0
  12. data/app/services/foreman_ansible/import_playbooks_success_notification.rb +33 -0
  13. data/app/services/foreman_ansible/playbooks_importer.rb +73 -0
  14. data/app/services/foreman_ansible/proxy_api.rb +3 -4
  15. data/app/services/foreman_ansible/variables_importer.rb +9 -9
  16. data/app/views/ansible_roles/index.html.erb +2 -0
  17. data/app/views/api/v2/ansible_playbooks/sync.json.rabl +5 -0
  18. data/app/views/api/v2/hostgroups/ansible_roles.json.rabl +9 -1
  19. data/app/views/api/v2/hosts/ansible_roles.json.rabl +9 -1
  20. data/app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_git.erb +4 -1
  21. data/app/views/foreman_ansible/job_templates/ansible_windows_updates.erb +160 -0
  22. data/config/routes.rb +10 -3
  23. data/db/migrate/20200421201839_update_ansible_inv_template_name.rb +1 -5
  24. data/db/seeds.d/90_notification_blueprints.rb +14 -0
  25. data/lib/foreman_ansible/engine.rb +0 -1
  26. data/lib/foreman_ansible/register.rb +9 -3
  27. data/lib/foreman_ansible/version.rb +1 -1
  28. data/locale/action_names.rb +4 -3
  29. data/locale/ca/foreman_ansible.edit.po +1162 -0
  30. data/locale/ca/foreman_ansible.po +360 -45
  31. data/{webpack/components/withPagination.js → locale/ca/foreman_ansible.po.time_stamp} +0 -0
  32. data/locale/cs_CZ/foreman_ansible.edit.po +1207 -0
  33. data/locale/cs_CZ/foreman_ansible.po +372 -57
  34. data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
  35. data/locale/de/foreman_ansible.edit.po +1148 -0
  36. data/locale/de/foreman_ansible.po +355 -40
  37. data/locale/de/foreman_ansible.po.time_stamp +0 -0
  38. data/locale/en/foreman_ansible.edit.po +1146 -0
  39. data/locale/en/foreman_ansible.po +355 -40
  40. data/locale/en/foreman_ansible.po.time_stamp +0 -0
  41. data/locale/en_GB/foreman_ansible.edit.po +1155 -0
  42. data/locale/en_GB/foreman_ansible.po +357 -42
  43. data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
  44. data/locale/es/foreman_ansible.edit.po +1148 -0
  45. data/locale/es/foreman_ansible.po +355 -40
  46. data/locale/es/foreman_ansible.po.time_stamp +0 -0
  47. data/locale/foreman_ansible.pot +767 -263
  48. data/locale/fr/foreman_ansible.edit.po +1148 -0
  49. data/locale/fr/foreman_ansible.po +355 -40
  50. data/locale/fr/foreman_ansible.po.time_stamp +0 -0
  51. data/locale/gl/foreman_ansible.edit.po +1156 -0
  52. data/locale/gl/foreman_ansible.po +358 -43
  53. data/locale/gl/foreman_ansible.po.time_stamp +0 -0
  54. data/locale/it/foreman_ansible.edit.po +1148 -0
  55. data/locale/it/foreman_ansible.po +355 -40
  56. data/locale/it/foreman_ansible.po.time_stamp +0 -0
  57. data/locale/ja/foreman_ansible.edit.po +1148 -0
  58. data/locale/ja/foreman_ansible.po +355 -40
  59. data/locale/ja/foreman_ansible.po.time_stamp +0 -0
  60. data/locale/ko/foreman_ansible.edit.po +1148 -0
  61. data/locale/ko/foreman_ansible.po +355 -40
  62. data/locale/ko/foreman_ansible.po.time_stamp +0 -0
  63. data/locale/nl_NL/foreman_ansible.edit.po +1168 -0
  64. data/locale/nl_NL/foreman_ansible.po +359 -44
  65. data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
  66. data/locale/pl/foreman_ansible.edit.po +1180 -0
  67. data/locale/pl/foreman_ansible.po +363 -48
  68. data/locale/pl/foreman_ansible.po.time_stamp +0 -0
  69. data/locale/pt_BR/foreman_ansible.edit.po +1148 -0
  70. data/locale/pt_BR/foreman_ansible.po +355 -40
  71. data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
  72. data/locale/ru/foreman_ansible.edit.po +1149 -0
  73. data/locale/ru/foreman_ansible.po +355 -40
  74. data/locale/ru/foreman_ansible.po.time_stamp +0 -0
  75. data/locale/sv_SE/foreman_ansible.edit.po +1180 -0
  76. data/locale/sv_SE/foreman_ansible.po +363 -48
  77. data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
  78. data/locale/zh_CN/foreman_ansible.edit.po +1148 -0
  79. data/locale/zh_CN/foreman_ansible.po +355 -40
  80. data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
  81. data/locale/zh_TW/foreman_ansible.edit.po +1148 -0
  82. data/locale/zh_TW/foreman_ansible.po +355 -40
  83. data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
  84. data/test/fixtures/playbooks_example_output.json +1 -0
  85. data/test/fixtures/sample_playbooks.json +10 -0
  86. data/test/functional/api/v2/ansible_playbooks_controller_test.rb +65 -0
  87. data/test/functional/hosts_controller_test.rb +2 -2
  88. data/test/graphql/queries/host_ansible_roles_query_test.rb +61 -0
  89. data/test/unit/import_playbooks_test.rb +51 -0
  90. data/test/unit/lib/proxy_api/ansible_test.rb +6 -0
  91. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTable.js +58 -75
  92. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js +44 -58
  93. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig +151 -0
  94. data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js +43 -56
  95. data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/index.js +1 -1
  96. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/EditRolesForm.js +26 -24
  97. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/index.js +3 -2
  98. data/webpack/components/AnsibleHostDetail/components/RolesTab/RolesTable.js +39 -43
  99. data/webpack/components/AnsibleHostDetail/components/RolesTab/__test__/RolesTab.fixtures.js +30 -0
  100. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariables.js +27 -38
  101. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesActions.js +2 -1
  102. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesConstants.js +1 -0
  103. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesSelectors.js +6 -0
  104. data/webpack/components/AnsibleRolesAndVariables/index.js +7 -1
  105. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcher.test.js +0 -2
  106. data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRole.js +3 -12
  107. data/webpack/components/AnsibleRolesSwitcher/components/AvailableRolesList.js +2 -2
  108. data/webpack/components/AnsibleRolesSwitcher/components/OrderedRolesTooltip.js +11 -12
  109. data/webpack/components/AnsibleRolesSwitcher/components/__snapshots__/AnsibleRole.test.js.snap +6 -20
  110. data/webpack/components/AnsibleRolesSwitcher/components/__snapshots__/AvailableRolesList.test.js.snap +9 -6
  111. data/webpack/components/withLoading.js +7 -12
  112. data/webpack/graphql/queries/allAnsibleRoles.gql +3 -0
  113. data/webpack/graphql/queries/hostAnsibleRoles.gql +3 -0
  114. data/webpack/helpers/pageParamsHelper.js +3 -3
  115. metadata +87 -34
  116. data/app/helpers/foreman_ansible/hosts_helper_extensions.rb +0 -30
  117. data/webpack/helpers/paginationHelper.js +0 -9
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.0.4
4
+ version: 8.0.1
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: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2022-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list
@@ -81,6 +81,7 @@ files:
81
81
  - app/controllers/ansible_variables_controller.rb
82
82
  - app/controllers/api/v2/ansible_inventories_controller.rb
83
83
  - app/controllers/api/v2/ansible_override_values_controller.rb
84
+ - app/controllers/api/v2/ansible_playbooks_controller.rb
84
85
  - app/controllers/api/v2/ansible_roles_controller.rb
85
86
  - app/controllers/api/v2/ansible_variables_controller.rb
86
87
  - app/controllers/concerns/foreman/controller/parameters/ansible_override_value.rb
@@ -112,7 +113,8 @@ files:
112
113
  - app/helpers/foreman_ansible/ansible_reports_helper.rb
113
114
  - app/helpers/foreman_ansible/ansible_roles_data_preparations.rb
114
115
  - app/helpers/foreman_ansible/ansible_roles_helper.rb
115
- - app/helpers/foreman_ansible/hosts_helper_extensions.rb
116
+ - app/helpers/foreman_ansible/hosts_helper.rb
117
+ - app/jobs/sync_playbooks.rb
116
118
  - app/jobs/sync_roles_and_variables.rb
117
119
  - app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
118
120
  - app/lib/proxy_api/ansible.rb
@@ -131,6 +133,8 @@ files:
131
133
  - app/services/foreman_ansible/ansible_report_importer.rb
132
134
  - app/services/foreman_ansible/ansible_report_scanner.rb
133
135
  - app/services/foreman_ansible/api_roles_importer.rb
136
+ - app/services/foreman_ansible/import_playbooks_error_notification.rb
137
+ - app/services/foreman_ansible/import_playbooks_success_notification.rb
134
138
  - app/services/foreman_ansible/import_roles_and_variables_error_notification.rb
135
139
  - app/services/foreman_ansible/import_roles_and_variables_success_notification.rb
136
140
  - app/services/foreman_ansible/insights_notification_builder.rb
@@ -138,6 +142,7 @@ files:
138
142
  - app/services/foreman_ansible/inventory_creator.rb
139
143
  - app/services/foreman_ansible/override_resolver.rb
140
144
  - app/services/foreman_ansible/playbook_creator.rb
145
+ - app/services/foreman_ansible/playbooks_importer.rb
141
146
  - app/services/foreman_ansible/proxy_api.rb
142
147
  - app/services/foreman_ansible/renderer_methods.rb
143
148
  - app/services/foreman_ansible/roles_importer.rb
@@ -152,6 +157,7 @@ files:
152
157
  - app/views/ansible_variables/new.html.erb
153
158
  - app/views/api/v2/ansible_override_values/index.json.rabl
154
159
  - app/views/api/v2/ansible_override_values/show.json.rabl
160
+ - app/views/api/v2/ansible_playbooks/sync.json.rabl
155
161
  - app/views/api/v2/ansible_roles/import.json.rabl
156
162
  - app/views/api/v2/ansible_roles/index.json.rabl
157
163
  - app/views/api/v2/ansible_roles/obsolete.json.rabl
@@ -178,6 +184,7 @@ files:
178
184
  - app/views/foreman_ansible/job_templates/ansible_roles_-_ansible_default.erb
179
185
  - app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_galaxy.erb
180
186
  - app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_git.erb
187
+ - app/views/foreman_ansible/job_templates/ansible_windows_updates.erb
181
188
  - app/views/foreman_ansible/job_templates/capsule_upgrade_-_ansible_default.erb
182
189
  - app/views/foreman_ansible/job_templates/convert_to_rhel.erb
183
190
  - app/views/foreman_ansible/job_templates/maintenance_plan.erb
@@ -221,55 +228,94 @@ files:
221
228
  - locale/Makefile
222
229
  - locale/action_names.rb
223
230
  - locale/ca/LC_MESSAGES/foreman_ansible.mo
231
+ - locale/ca/foreman_ansible.edit.po
224
232
  - locale/ca/foreman_ansible.po
233
+ - locale/ca/foreman_ansible.po.time_stamp
225
234
  - locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo
235
+ - locale/cs_CZ/foreman_ansible.edit.po
226
236
  - locale/cs_CZ/foreman_ansible.po
237
+ - locale/cs_CZ/foreman_ansible.po.time_stamp
227
238
  - locale/de/LC_MESSAGES/foreman_ansible.mo
239
+ - locale/de/foreman_ansible.edit.po
228
240
  - locale/de/foreman_ansible.po
241
+ - locale/de/foreman_ansible.po.time_stamp
229
242
  - locale/en/LC_MESSAGES/foreman_ansible.mo
243
+ - locale/en/foreman_ansible.edit.po
230
244
  - locale/en/foreman_ansible.po
245
+ - locale/en/foreman_ansible.po.time_stamp
231
246
  - locale/en_GB/LC_MESSAGES/foreman_ansible.mo
247
+ - locale/en_GB/foreman_ansible.edit.po
232
248
  - locale/en_GB/foreman_ansible.po
249
+ - locale/en_GB/foreman_ansible.po.time_stamp
233
250
  - locale/es/LC_MESSAGES/foreman_ansible.mo
251
+ - locale/es/foreman_ansible.edit.po
234
252
  - locale/es/foreman_ansible.po
253
+ - locale/es/foreman_ansible.po.time_stamp
235
254
  - locale/foreman_ansible.pot
236
255
  - locale/fr/LC_MESSAGES/foreman_ansible.mo
256
+ - locale/fr/foreman_ansible.edit.po
237
257
  - locale/fr/foreman_ansible.po
258
+ - locale/fr/foreman_ansible.po.time_stamp
238
259
  - locale/gemspec.rb
239
260
  - locale/gl/LC_MESSAGES/foreman_ansible.mo
261
+ - locale/gl/foreman_ansible.edit.po
240
262
  - locale/gl/foreman_ansible.po
263
+ - locale/gl/foreman_ansible.po.time_stamp
241
264
  - locale/it/LC_MESSAGES/foreman_ansible.mo
265
+ - locale/it/foreman_ansible.edit.po
242
266
  - locale/it/foreman_ansible.po
267
+ - locale/it/foreman_ansible.po.time_stamp
243
268
  - locale/ja/LC_MESSAGES/foreman_ansible.mo
269
+ - locale/ja/foreman_ansible.edit.po
244
270
  - locale/ja/foreman_ansible.po
271
+ - locale/ja/foreman_ansible.po.time_stamp
245
272
  - locale/ko/LC_MESSAGES/foreman_ansible.mo
273
+ - locale/ko/foreman_ansible.edit.po
246
274
  - locale/ko/foreman_ansible.po
275
+ - locale/ko/foreman_ansible.po.time_stamp
247
276
  - locale/nl_NL/LC_MESSAGES/foreman_ansible.mo
277
+ - locale/nl_NL/foreman_ansible.edit.po
248
278
  - locale/nl_NL/foreman_ansible.po
279
+ - locale/nl_NL/foreman_ansible.po.time_stamp
249
280
  - locale/pl/LC_MESSAGES/foreman_ansible.mo
281
+ - locale/pl/foreman_ansible.edit.po
250
282
  - locale/pl/foreman_ansible.po
283
+ - locale/pl/foreman_ansible.po.time_stamp
251
284
  - locale/pt_BR/LC_MESSAGES/foreman_ansible.mo
285
+ - locale/pt_BR/foreman_ansible.edit.po
252
286
  - locale/pt_BR/foreman_ansible.po
287
+ - locale/pt_BR/foreman_ansible.po.time_stamp
253
288
  - locale/ru/LC_MESSAGES/foreman_ansible.mo
289
+ - locale/ru/foreman_ansible.edit.po
254
290
  - locale/ru/foreman_ansible.po
291
+ - locale/ru/foreman_ansible.po.time_stamp
255
292
  - locale/sv_SE/LC_MESSAGES/foreman_ansible.mo
293
+ - locale/sv_SE/foreman_ansible.edit.po
256
294
  - locale/sv_SE/foreman_ansible.po
295
+ - locale/sv_SE/foreman_ansible.po.time_stamp
257
296
  - locale/zh_CN/LC_MESSAGES/foreman_ansible.mo
297
+ - locale/zh_CN/foreman_ansible.edit.po
258
298
  - locale/zh_CN/foreman_ansible.po
299
+ - locale/zh_CN/foreman_ansible.po.time_stamp
259
300
  - locale/zh_TW/LC_MESSAGES/foreman_ansible.mo
301
+ - locale/zh_TW/foreman_ansible.edit.po
260
302
  - locale/zh_TW/foreman_ansible.po
303
+ - locale/zh_TW/foreman_ansible.po.time_stamp
261
304
  - package.json
262
305
  - test/factories/ansible_proxy.rb
263
306
  - test/factories/ansible_roles.rb
264
307
  - test/factories/ansible_variables.rb
265
308
  - test/factories/host_ansible_enhancements.rb
266
309
  - test/fixtures/insights_playbook.yaml
310
+ - test/fixtures/playbooks_example_output.json
267
311
  - test/fixtures/report.json
268
312
  - test/fixtures/sample_facts.json
313
+ - test/fixtures/sample_playbooks.json
269
314
  - test/foreman_ansible/helpers/ansible_roles_helper_test.rb
270
315
  - test/functional/ansible_roles_controller_test.rb
271
316
  - test/functional/ansible_variables_controller_test.rb
272
317
  - test/functional/api/v2/ansible_inventories_controller_test.rb
318
+ - test/functional/api/v2/ansible_playbooks_controller_test.rb
273
319
  - test/functional/api/v2/ansible_roles_controller_test.rb
274
320
  - test/functional/api/v2/ansible_variables_controller_test.rb
275
321
  - test/functional/api/v2/hostgroups_controller_test.rb
@@ -278,6 +324,7 @@ files:
278
324
  - test/functional/ui_ansible_roles_controller_test.rb
279
325
  - test/graphql/mutations/hosts/assign_ansible_roles_mutation_test.rb
280
326
  - test/graphql/queries/ansible_roles_query_test.rb
327
+ - test/graphql/queries/host_ansible_roles_query_test.rb
281
328
  - test/test_plugin_helper.rb
282
329
  - test/unit/actions/run_ansible_job_test.rb
283
330
  - test/unit/actions/run_proxy_ansible_command_test.rb
@@ -291,6 +338,7 @@ files:
291
338
  - test/unit/host_ansible_role_test.rb
292
339
  - test/unit/hostgroup_ansible_role_test.rb
293
340
  - test/unit/ignore_roles_test.rb
341
+ - test/unit/import_playbooks_test.rb
294
342
  - test/unit/import_roles_and_variables.rb
295
343
  - test/unit/lib/proxy_api/ansible_test.rb
296
344
  - test/unit/services/ansible_report_importer_test.rb
@@ -326,6 +374,7 @@ files:
326
374
  - webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.js
327
375
  - webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.scss
328
376
  - webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js
377
+ - webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig
329
378
  - webpack/components/AnsibleHostDetail/components/JobsTab/RecurringJobsTable.js
330
379
  - webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.fixtures.js
331
380
  - webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.test.js
@@ -352,6 +401,7 @@ files:
352
401
  - webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesActions.js
353
402
  - webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesConstants.js
354
403
  - webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesHelpers.js
404
+ - webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariablesSelectors.js
355
405
  - webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
356
406
  - webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesImport.test.js
357
407
  - webpack/components/AnsibleRolesAndVariables/index.js
@@ -400,7 +450,6 @@ files:
400
450
  - webpack/components/ErrorState.js
401
451
  - webpack/components/ReportJsonViewer.js
402
452
  - webpack/components/withLoading.js
403
- - webpack/components/withPagination.js
404
453
  - webpack/formHelper.js
405
454
  - webpack/globalIdHelper.js
406
455
  - webpack/global_index.js
@@ -418,7 +467,6 @@ files:
418
467
  - webpack/graphql/queries/hostVariableOverrides.gql
419
468
  - webpack/graphql/queries/recurringJobs.gql
420
469
  - webpack/helpers/pageParamsHelper.js
421
- - webpack/helpers/paginationHelper.js
422
470
  - webpack/index.js
423
471
  - webpack/permissionsHelper.js
424
472
  - webpack/reducer.js
@@ -447,50 +495,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
447
495
  - !ruby/object:Gem::Version
448
496
  version: '0'
449
497
  requirements: []
450
- rubygems_version: 3.1.4
498
+ rubygems_version: 3.3.7
451
499
  signing_key:
452
500
  specification_version: 4
453
501
  summary: Ansible integration with Foreman (theforeman.org)
454
502
  test_files:
455
- - test/factories/ansible_proxy.rb
456
- - test/factories/ansible_roles.rb
457
- - test/factories/ansible_variables.rb
458
- - test/factories/host_ansible_enhancements.rb
459
- - test/fixtures/insights_playbook.yaml
460
- - test/fixtures/sample_facts.json
461
- - test/fixtures/report.json
462
- - test/functional/ansible_roles_controller_test.rb
463
- - test/functional/api/v2/ansible_inventories_controller_test.rb
503
+ - test/functional/api/v2/ansible_playbooks_controller_test.rb
504
+ - test/functional/api/v2/hosts_controller_test.rb
464
505
  - test/functional/api/v2/ansible_roles_controller_test.rb
465
- - test/functional/api/v2/ansible_variables_controller_test.rb
466
506
  - test/functional/api/v2/hostgroups_controller_test.rb
467
- - test/functional/api/v2/hosts_controller_test.rb
468
- - test/functional/ui_ansible_roles_controller_test.rb
469
- - test/functional/ansible_variables_controller_test.rb
507
+ - test/functional/api/v2/ansible_variables_controller_test.rb
508
+ - test/functional/api/v2/ansible_inventories_controller_test.rb
470
509
  - test/functional/hosts_controller_test.rb
471
- - test/test_plugin_helper.rb
472
- - test/unit/actions/run_ansible_job_test.rb
473
- - test/unit/actions/run_proxy_ansible_command_test.rb
474
- - test/unit/ansible_role_test.rb
475
- - test/unit/concerns/config_reports_extensions_test.rb
476
- - test/unit/concerns/host_managed_extensions_test.rb
477
- - test/unit/concerns/hostgroup_extensions_test.rb
478
- - test/unit/helpers/ansible_reports_helper_test.rb
479
- - test/unit/lib/proxy_api/ansible_test.rb
510
+ - test/functional/ansible_roles_controller_test.rb
511
+ - test/functional/ansible_variables_controller_test.rb
512
+ - test/functional/ui_ansible_roles_controller_test.rb
513
+ - test/unit/services/inventory_creator_test.rb
480
514
  - test/unit/services/ansible_report_importer_test.rb
481
- - test/unit/services/insights_plan_runner_test.rb
515
+ - test/unit/services/ui_roles_importer_test.rb
482
516
  - test/unit/services/roles_importer_test.rb
483
517
  - test/unit/services/ansible_variables_importer_test.rb
484
- - test/unit/services/api_roles_importer_test.rb
485
- - test/unit/services/inventory_creator_test.rb
486
518
  - test/unit/services/override_resolver_test.rb
487
- - test/unit/services/ui_roles_importer_test.rb
488
- - test/unit/ansible_provider_test.rb
489
- - test/unit/ansible_variable_test.rb
519
+ - test/unit/services/api_roles_importer_test.rb
520
+ - test/unit/services/insights_plan_runner_test.rb
521
+ - test/unit/ansible_role_test.rb
490
522
  - test/unit/host_ansible_role_test.rb
523
+ - test/unit/import_playbooks_test.rb
491
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
492
530
  - test/unit/ignore_roles_test.rb
531
+ - test/unit/ansible_variable_test.rb
493
532
  - test/unit/import_roles_and_variables.rb
533
+ - test/unit/lib/proxy_api/ansible_test.rb
534
+ - test/unit/actions/run_ansible_job_test.rb
535
+ - test/unit/actions/run_proxy_ansible_command_test.rb
494
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
495
547
  - test/graphql/mutations/hosts/assign_ansible_roles_mutation_test.rb
548
+ - test/graphql/queries/host_ansible_roles_query_test.rb
496
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
@@ -1,9 +0,0 @@
1
- import { addSearch } from './pageParamsHelper';
2
-
3
- export const preparePerPageOptions = opts =>
4
- opts.map(item => ({ title: item.toString(), value: item }));
5
-
6
- export const refreshPage = (history, params = {}) => {
7
- const url = addSearch(history.location.pathname, params);
8
- history.push(url);
9
- };