foreman_ansible 15.0.7 → 16.0.1

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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_ansible/locale/ca/foreman_ansible.js +10 -1
  3. data/app/assets/javascripts/foreman_ansible/locale/cs_CZ/foreman_ansible.js +10 -1
  4. data/app/assets/javascripts/foreman_ansible/locale/de/foreman_ansible.js +10 -1
  5. data/app/assets/javascripts/foreman_ansible/locale/es/foreman_ansible.js +10 -1
  6. data/app/assets/javascripts/foreman_ansible/locale/gl/foreman_ansible.js +10 -1
  7. data/app/assets/javascripts/foreman_ansible/locale/it/foreman_ansible.js +10 -1
  8. data/app/assets/javascripts/foreman_ansible/locale/ka/foreman_ansible.js +10 -1
  9. data/app/assets/javascripts/foreman_ansible/locale/nl_NL/foreman_ansible.js +10 -1
  10. data/app/assets/javascripts/foreman_ansible/locale/pl/foreman_ansible.js +10 -1
  11. data/app/assets/javascripts/foreman_ansible/locale/pt_BR/foreman_ansible.js +10 -1
  12. data/app/assets/javascripts/foreman_ansible/locale/ru/foreman_ansible.js +10 -1
  13. data/app/assets/javascripts/foreman_ansible/locale/sv_SE/foreman_ansible.js +10 -1
  14. data/app/assets/javascripts/foreman_ansible/locale/zh_TW/foreman_ansible.js +10 -1
  15. data/app/controllers/concerns/foreman/controller/parameters/job_template_extensions.rb +1 -1
  16. data/app/controllers/foreman_ansible/api/v2/job_templates_controller_extensions.rb +1 -0
  17. data/app/models/foreman_ansible/ansible_provider.rb +1 -0
  18. data/app/views/api/v2/job_templates/job_templates.json.rabl +1 -1
  19. data/app/views/foreman_ansible/job_templates/package_action_-_ansible_default.erb +19 -3
  20. data/app/views/foreman_ansible/job_templates/snippet/check_bootc_status.erb +22 -0
  21. data/app/views/job_templates/_job_template_callback_tab_content.html.erb +1 -0
  22. data/db/migrate/20241022000000_add_ansible_check_mode_to_templates.rb +5 -0
  23. data/lib/foreman_ansible/register.rb +1 -1
  24. data/lib/foreman_ansible/version.rb +1 -1
  25. data/locale/ca/LC_MESSAGES/foreman_ansible.mo +0 -0
  26. data/locale/ca/foreman_ansible.po +10 -1
  27. data/locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo +0 -0
  28. data/locale/cs_CZ/foreman_ansible.po +10 -1
  29. data/locale/de/LC_MESSAGES/foreman_ansible.mo +0 -0
  30. data/locale/de/foreman_ansible.po +10 -1
  31. data/locale/es/LC_MESSAGES/foreman_ansible.mo +0 -0
  32. data/locale/es/foreman_ansible.po +11 -2
  33. data/locale/gl/LC_MESSAGES/foreman_ansible.mo +0 -0
  34. data/locale/gl/foreman_ansible.po +10 -1
  35. data/locale/it/LC_MESSAGES/foreman_ansible.mo +0 -0
  36. data/locale/it/foreman_ansible.po +10 -1
  37. data/locale/ka/LC_MESSAGES/foreman_ansible.mo +0 -0
  38. data/locale/ka/foreman_ansible.po +10 -1
  39. data/locale/nl_NL/LC_MESSAGES/foreman_ansible.mo +0 -0
  40. data/locale/nl_NL/foreman_ansible.po +10 -1
  41. data/locale/pl/LC_MESSAGES/foreman_ansible.mo +0 -0
  42. data/locale/pl/foreman_ansible.po +10 -1
  43. data/locale/pt_BR/LC_MESSAGES/foreman_ansible.mo +0 -0
  44. data/locale/pt_BR/foreman_ansible.po +10 -1
  45. data/locale/ru/LC_MESSAGES/foreman_ansible.mo +0 -0
  46. data/locale/ru/foreman_ansible.po +10 -1
  47. data/locale/sv_SE/LC_MESSAGES/foreman_ansible.mo +0 -0
  48. data/locale/sv_SE/foreman_ansible.po +10 -1
  49. data/locale/zh_TW/LC_MESSAGES/foreman_ansible.mo +0 -0
  50. data/locale/zh_TW/foreman_ansible.po +10 -1
  51. data/webpack/components/AnsibleHostDetail/AnsibleHostDetail.scss +1 -1
  52. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTable.js +4 -11
  53. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/EditableValueHelper.js +11 -5
  54. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/__test__/AnsibleVariableOverrides.test.js +1 -1
  55. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/__test__/AnsibleVariableOverridesDelete.test.js +2 -2
  56. data/webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.scss +2 -2
  57. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js +3 -10
  58. data/webpack/components/AnsibleHostDetail/components/JobsTab/RecurringJobsTable.js +3 -10
  59. data/webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.test.js +2 -1
  60. data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js +3 -10
  61. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/EditRolesModal.scss +1 -1
  62. data/webpack/components/AnsibleHostDetail/components/RolesTab/RolesTable.js +3 -10
  63. data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariables.js +3 -3
  64. data/webpack/components/DualList/ListControls.js +9 -9
  65. data/webpack/components/DualList/ListHeader.js +5 -3
  66. data/webpack/components/DualList/ListItem.js +9 -9
  67. data/webpack/components/DualList/ListPane.js +3 -3
  68. data/webpack/components/DualList/SelectedStatus.js +2 -2
  69. data/webpack/components/DualList/index.js +1 -1
  70. data/webpack/formHelper.js +26 -29
  71. data/webpack/routes/HostgroupJobs/__test__/HostgroupJobs.test.js +1 -0
  72. metadata +10 -12
  73. data/app/assets/javascripts/foreman_ansible/locale/en/foreman_ansible.js +0 -910
  74. data/app/assets/javascripts/foreman_ansible/locale/en_GB/foreman_ansible.js +0 -910
  75. data/locale/en/foreman_ansible.po +0 -908
  76. data/locale/en_GB/foreman_ansible.po +0 -912
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05b3398d51707251f9c868cc188a6192dfcd2686939ae05271dbe50c600f4abb
4
- data.tar.gz: 369fd9c595d83045109c6cda737f2480495e9d276a6f1ca72cef41002ec313b0
3
+ metadata.gz: 3e3320155d14901c6c7a28378a8520c0a382582c03ad74fa60f5d1118eaf6034
4
+ data.tar.gz: 5a72a8d7537919e8cc1d5013d8b6480c472ceeced50cd13d666d65ddab4cf4ed
5
5
  SHA512:
6
- metadata.gz: a6e28e873d00903a7ee50d360996633274966f70318a98df742f3ae704925b9b7eb6cc8b00c02ec863adaa289ff5c57e1ea29176ede7c6ec7e636dfe5edf61bf
7
- data.tar.gz: 945a4206866fb31d2a5800beb02592e62e86e26dc7899a60f8f58c11e827cc791d66498e837a9a448e544eec2c08c5b3cad00349fa603e00350a09dfbc46a5cf
6
+ metadata.gz: 3725cc132048d7eed961875ecb3f325f7e6d39181d7f8889ae5fd74d5f972e77f8c742349f73aa7865aa671966cf31de00eb2208616c9a4a7260761dfaef8cea
7
+ data.tar.gz: 9eb0b494ff4a74615f21e6ff83cd4c02957760b23d7d6a59979a3a93f40a1f5cd85dc15bb34c4596ef83fa928b8cb0d5ccde6e656a9fcc39da92efbcfc9f3d1a
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Pavel Borecki <pavel.borecki@gmail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  "Aktualizuje Ansible proměnné"
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Wiederoder <stefanwiederoder@googlemail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  "Aktualisiert die Ansible-Variable"
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Carmela Rubiños <carmela.rubinos@gmail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  "Actualiza la variable de Ansible"
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Carmela Rubiños <carmela.rubinos@gmail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "0868a4d1af5275b3f70b0a6dac4c99a4, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Temuri Doghonadze <temuri.doghonadze@gmail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  "Ansible-ის უკუგამოძახების ჩართვა"
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  "უკუგამოძახების დამატების ჩართვა ამ ნიმუშისთვის"
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  "ჭკვიანი პროქსის განახლება"
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  "Ansible-ის ცვლადის განახლება"
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Ewoud Kohl van Wijngaarden <ewoud+transifex@kohlvanwijngaarden.nl>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Michał Foryt <michal.foryt@gmail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "Luiz Henrique Vasconcelos <luizvasconceloss@yahoo.com.br>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  "Atualiza a variável do Ansible"
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "0868a4d1af5275b3f70b0a6dac4c99a4, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "johnny.westerlund <johnny.westerlund@gmail.com>, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_ansible": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_ansible 15.0.0",
6
+ "Project-Id-Version": "foreman_ansible 15.0.5",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2018-11-14 21:36+0000",
9
9
  "Last-Translator": "0868a4d1af5275b3f70b0a6dac4c99a4, 2023",
@@ -284,6 +284,12 @@
284
284
  "Enable Ansible Callback": [
285
285
  ""
286
286
  ],
287
+ "Enable Ansible Check Mode": [
288
+ ""
289
+ ],
290
+ "Enable Ansible Check Mode for this template": [
291
+ ""
292
+ ],
287
293
  "Enable the callback plugin for this template": [
288
294
  ""
289
295
  ],
@@ -815,6 +821,9 @@
815
821
  "Update Smart Proxy": [
816
822
  ""
817
823
  ],
824
+ "Update an override value": [
825
+ ""
826
+ ],
818
827
  "Updates Ansible variable": [
819
828
  ""
820
829
  ],
@@ -7,7 +7,7 @@ module Foreman
7
7
  class_methods do
8
8
  def job_template_params_filter
9
9
  super.tap do |filter|
10
- filter.permit :ansible_callback_enabled
10
+ filter.permit :ansible_callback_enabled, :ansible_check_mode
11
11
  end
12
12
  end
13
13
  end
@@ -10,6 +10,7 @@ module ForemanAnsible
10
10
  update_api(:create, :update) do
11
11
  param :job_template, Hash do
12
12
  param :ansible_callback_enabled, :bool, :desc => N_('Enable the callback plugin for this template')
13
+ param :ansible_check_mode, :bool, :desc => N_('Enable Ansible Check Mode for this template')
13
14
  end
14
15
  end
15
16
  end
@@ -33,6 +33,7 @@ if defined? ForemanRemoteExecution
33
33
  ),
34
34
  :name => host.name,
35
35
  :check_mode => host.host_param('ansible_roles_check_mode'),
36
+ :job_check_mode => template_invocation.template.ansible_check_mode,
36
37
  :cleanup_working_dirs => cleanup_working_dirs?(host)
37
38
  )
38
39
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- attributes :ansible_callback_enabled
3
+ attributes :ansible_callback_enabled, :ansible_check_mode
@@ -39,10 +39,26 @@ model: JobTemplate
39
39
  - shell: "<%= input('pre_script') %>"
40
40
  <%- end -%>
41
41
  tasks:
42
- - package:
42
+ <%= indent(4) { snippet('check_bootc_status') } %>
43
+ - name: Enable bootc overlay
44
+ shell:
45
+ cmd: 'bootc usr-overlay'
46
+ register: out
47
+ ignore_errors: true
48
+ when: is_bootc_host
49
+ - debug: var=out
50
+ - name: Install packages via dnf for image mode machines
51
+ package:
52
+ use: 'dnf'
43
53
  <%= indent(8) { to_yaml({"name" => input('name')}).gsub(/---\n/, '') } -%>
44
54
  state: <%= input('state') %>
45
- <%- if input('post_script').present? -%>
55
+ when: is_bootc_host
56
+ - name: Install packages normally
57
+ package:
58
+ <%= indent(8) { to_yaml({"name" => input('name')}).gsub(/---\n/, '') } -%>
59
+ state: <%= input('state') %>
60
+ when: not is_bootc_host
61
+ <%- if input('post_script').present? -%>
46
62
  post_tasks:
47
63
  - shell: "<%= input('post_script') %>"
48
- <%- end -%>
64
+ <%- end -%>
@@ -0,0 +1,22 @@
1
+ <%#
2
+ kind: snippet
3
+ name: check_bootc_status
4
+ provider_type: Ansible
5
+ model: JobTemplate
6
+ snippet: true
7
+ description: |
8
+ This snippet checks if a host is a bootc (image mode) host.
9
+ -%>
10
+ - name: Collect bootc status
11
+ shell:
12
+ cmd: 'bootc status --json'
13
+ register: bootc_status
14
+ ignore_errors: true
15
+ - name: Parse bootc status json
16
+ set_fact:
17
+ bootc_status_json: "{{ bootc_status.stdout | from_json }}"
18
+ when: bootc_status.rc == 0
19
+ - name: Determine host is a bootc host
20
+ set_fact:
21
+ is_bootc_host: "{{ bootc_status_json is defined and bootc_status_json['status']['booted'] | trim != 'None' }}"
22
+
@@ -1,3 +1,4 @@
1
1
  <div class="tab-pane" id="ansible_callback_enabled">
2
2
  <%= checkbox_f f, :ansible_callback_enabled, :label => _('Enable Ansible Callback'), :disabled => @template.locked? %>
3
+ <%= checkbox_f f, :ansible_check_mode, :label => _('Enable Ansible Check Mode'), :disabled => @template.locked? %>
3
4
  </div>
@@ -0,0 +1,5 @@
1
+ class AddAnsibleCheckModeToTemplates < ActiveRecord::Migration[7.0]
2
+ def change
3
+ add_column :templates, :ansible_check_mode, :boolean, default: false
4
+ end
5
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Foreman::Plugin.register :foreman_ansible do
4
- requires_foreman '>= 3.13.0'
4
+ requires_foreman '>= 3.15.0'
5
5
  register_gettext
6
6
 
7
7
  settings do
@@ -4,5 +4,5 @@
4
4
  # This way other parts of Foreman can just call ForemanAnsible::VERSION
5
5
  # and detect what version the plugin is running.
6
6
  module ForemanAnsible
7
- VERSION = '15.0.7'
7
+ VERSION = '16.0.1'
8
8
  end
@@ -8,7 +8,7 @@
8
8
  #
9
9
  msgid ""
10
10
  msgstr ""
11
- "Project-Id-Version: foreman_ansible 15.0.0\n"
11
+ "Project-Id-Version: foreman_ansible 15.0.5\n"
12
12
  "Report-Msgid-Bugs-To: \n"
13
13
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
14
14
  "Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2023\n"
@@ -286,6 +286,12 @@ msgstr ""
286
286
  msgid "Enable Ansible Callback"
287
287
  msgstr ""
288
288
 
289
+ msgid "Enable Ansible Check Mode"
290
+ msgstr ""
291
+
292
+ msgid "Enable Ansible Check Mode for this template"
293
+ msgstr ""
294
+
289
295
  msgid "Enable the callback plugin for this template"
290
296
  msgstr ""
291
297
 
@@ -822,6 +828,9 @@ msgstr ""
822
828
  msgid "Update Smart Proxy"
823
829
  msgstr ""
824
830
 
831
+ msgid "Update an override value"
832
+ msgstr ""
833
+
825
834
  msgid "Updates Ansible variable"
826
835
  msgstr ""
827
836
 
@@ -10,7 +10,7 @@
10
10
  #
11
11
  msgid ""
12
12
  msgstr ""
13
- "Project-Id-Version: foreman_ansible 15.0.0\n"
13
+ "Project-Id-Version: foreman_ansible 15.0.5\n"
14
14
  "Report-Msgid-Bugs-To: \n"
15
15
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
16
16
  "Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>, 2023\n"
@@ -290,6 +290,12 @@ msgstr ""
290
290
  msgid "Enable Ansible Callback"
291
291
  msgstr ""
292
292
 
293
+ msgid "Enable Ansible Check Mode"
294
+ msgstr ""
295
+
296
+ msgid "Enable Ansible Check Mode for this template"
297
+ msgstr ""
298
+
293
299
  msgid "Enable the callback plugin for this template"
294
300
  msgstr ""
295
301
 
@@ -823,6 +829,9 @@ msgstr ""
823
829
  msgid "Update Smart Proxy"
824
830
  msgstr ""
825
831
 
832
+ msgid "Update an override value"
833
+ msgstr ""
834
+
826
835
  msgid "Updates Ansible variable"
827
836
  msgstr "Aktualizuje Ansible proměnné"
828
837
 
@@ -21,7 +21,7 @@
21
21
  #
22
22
  msgid ""
23
23
  msgstr ""
24
- "Project-Id-Version: foreman_ansible 15.0.0\n"
24
+ "Project-Id-Version: foreman_ansible 15.0.5\n"
25
25
  "Report-Msgid-Bugs-To: \n"
26
26
  "PO-Revision-Date: 2018-11-14 21:36+0000\n"
27
27
  "Last-Translator: Wiederoder <stefanwiederoder@googlemail.com>, 2023\n"
@@ -299,6 +299,12 @@ msgstr "Ansible-Rollen bearbeiten"
299
299
  msgid "Enable Ansible Callback"
300
300
  msgstr ""
301
301
 
302
+ msgid "Enable Ansible Check Mode"
303
+ msgstr ""
304
+
305
+ msgid "Enable Ansible Check Mode for this template"
306
+ msgstr ""
307
+
302
308
  msgid "Enable the callback plugin for this template"
303
309
  msgstr ""
304
310
 
@@ -832,6 +838,9 @@ msgstr "Rollenvariablen entfernen"
832
838
  msgid "Update Smart Proxy"
833
839
  msgstr ""
834
840
 
841
+ msgid "Update an override value"
842
+ msgstr ""
843
+
835
844
  msgid "Updates Ansible variable"
836
845
  msgstr "Aktualisiert die Ansible-Variable"
837
846