foreman_ansible 15.0.2 → 15.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/ansible_override_values_controller.rb +17 -0
  3. data/config/routes.rb +8 -8
  4. data/lib/foreman_ansible/register.rb +1 -1
  5. data/lib/foreman_ansible/version.rb +1 -1
  6. metadata +3 -41
  7. data/locale/ca/foreman_ansible.edit.po +0 -1209
  8. data/locale/ca/foreman_ansible.po.time_stamp +0 -0
  9. data/locale/cs_CZ/foreman_ansible.edit.po +0 -1225
  10. data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
  11. data/locale/de/foreman_ansible.edit.po +0 -1248
  12. data/locale/de/foreman_ansible.po.time_stamp +0 -0
  13. data/locale/en/foreman_ansible.edit.po +0 -1202
  14. data/locale/en/foreman_ansible.po.time_stamp +0 -0
  15. data/locale/en_GB/foreman_ansible.edit.po +0 -1220
  16. data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
  17. data/locale/es/foreman_ansible.edit.po +0 -1247
  18. data/locale/es/foreman_ansible.po.time_stamp +0 -0
  19. data/locale/fr/foreman_ansible.edit.po +0 -1246
  20. data/locale/fr/foreman_ansible.po.time_stamp +0 -0
  21. data/locale/gl/foreman_ansible.edit.po +0 -1206
  22. data/locale/gl/foreman_ansible.po.time_stamp +0 -0
  23. data/locale/it/foreman_ansible.edit.po +0 -1224
  24. data/locale/it/foreman_ansible.po.time_stamp +0 -0
  25. data/locale/ja/foreman_ansible.edit.po +0 -1242
  26. data/locale/ja/foreman_ansible.po.time_stamp +0 -0
  27. data/locale/ka/foreman_ansible.edit.po +0 -1227
  28. data/locale/ka/foreman_ansible.po.time_stamp +0 -0
  29. data/locale/ko/foreman_ansible.edit.po +0 -1219
  30. data/locale/ko/foreman_ansible.po.time_stamp +0 -0
  31. data/locale/nl_NL/foreman_ansible.edit.po +0 -1214
  32. data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
  33. data/locale/pl/foreman_ansible.edit.po +0 -1209
  34. data/locale/pl/foreman_ansible.po.time_stamp +0 -0
  35. data/locale/pt_BR/foreman_ansible.edit.po +0 -1246
  36. data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
  37. data/locale/ru/foreman_ansible.edit.po +0 -1227
  38. data/locale/ru/foreman_ansible.po.time_stamp +0 -0
  39. data/locale/sv_SE/foreman_ansible.edit.po +0 -1209
  40. data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
  41. data/locale/zh_CN/foreman_ansible.edit.po +0 -1241
  42. data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
  43. data/locale/zh_TW/foreman_ansible.edit.po +0 -1220
  44. data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db50537ce55c457541ececd7bc377118b92ceb796e0517db0475fc602b1ed1db
4
- data.tar.gz: f7fe803efe0d47d5c78ba9893db6f59618703f1e6bfbb304953e884e018f50ae
3
+ metadata.gz: 6f963bf465d465b5dd726a0c79b7e9e3e70e3801ff7994ed926e844d129ee2de
4
+ data.tar.gz: e70220b7ae7b363a1d5b4c4fd1b1e7e135ac38a7197d433a1c39c9c8568c1ddf
5
5
  SHA512:
6
- metadata.gz: 8aba188174e0f15a47315054e742bb39db1617a85dafb069c6ed0a02459c84e6e563283bed45099f6042ab4045b0545bdb4526412af63948496685cffe1c2d80
7
- data.tar.gz: d69e35a71aacb8ac5c7bfde43fec71eaa6176914b98bddc4544f453b58d00afc8a709b9829239690ba3c7d67b184165920dcb0c68a85dfe752978d9a3a6fbd1e
6
+ metadata.gz: 8147a39927059bb3cb11c6f83cd6bf4c4130cc77306beda1cdd0d4b26dc90f871d0daa27bbb30fe469ed0da77c9b6c2c6cee5c1950547c9a9c33d17df7f6e240
7
+ data.tar.gz: 2b5cfcf174497532bc3b63176ad152980b135987fa8e6883c338e86083cabdd1a39987180a0a8cfecdf939d974b6d32db0e9fff1c2ab8719795af305a03fe71a
@@ -31,6 +31,23 @@ module Api
31
31
  render 'api/v2/ansible_override_values/show'
32
32
  end
33
33
 
34
+ api :PUT, "/ansible_override_values/:id", N_("Update an override value")
35
+ param :id, :identifier, :required => true
36
+ param_group :ansible_override_value, :as => :update
37
+
38
+ def update
39
+ @ansible_variable = AnsibleVariable.authorized(:edit_ansible_variables).
40
+ find_by(:id => params[:id].to_i)
41
+ @override_value = @ansible_variable.lookup_values.find_by(:match => lookup_value_params['override_value']['match'])
42
+
43
+ if @override_value
44
+ @override_value.update(lookup_value_params['override_value'])
45
+ render 'api/v2/ansible_override_values/show'
46
+ else
47
+ not_found
48
+ end
49
+ end
50
+
34
51
  api :DELETE, "/ansible_override_values/:id", N_("Destroy an override value")
35
52
  param :id, :identifier, :required => true
36
53
 
data/config/routes.rb CHANGED
@@ -7,14 +7,14 @@ Rails.application.routes.draw do
7
7
  :defaults => { apiv: 'v2' },
8
8
  :apiv => /v2/,
9
9
  :constraints => ApiConstraints.new(version: 2, default: true) do
10
- constraints(:id => %r{[^\/]+}) do
11
- resources :hosts, :except => [:new, :edit] do
10
+ constraints(:id => /[^\/]+/) do
11
+ resources :hosts, :only => [] do
12
12
  member do
13
13
  post :play_roles
14
14
  get :ansible_roles
15
15
  post :assign_ansible_roles
16
- put 'ansible_roles/:ansible_role_id', :to => 'hosts#add_ansible_role', :constraints => { id: %r{[^\/]+} }
17
- delete 'ansible_roles/:ansible_role_id', :to => 'hosts#remove_ansible_role', :constraints => { id: %r{[^\/]+} }
16
+ put 'ansible_roles/:ansible_role_id', :to => 'hosts#add_ansible_role', :constraints => { id: /[^\/]+/ }
17
+ delete 'ansible_roles/:ansible_role_id', :to => 'hosts#remove_ansible_role', :constraints => { id: /[^\/]+/ }
18
18
  end
19
19
  collection do
20
20
  post :multiple_play_roles
@@ -25,8 +25,8 @@ Rails.application.routes.draw do
25
25
  post :play_roles
26
26
  get :ansible_roles
27
27
  post :assign_ansible_roles
28
- put 'ansible_roles/:ansible_role_id', :to => 'hostgroups#add_ansible_role', :constraints => { id: %r{[^\/]+} }
29
- delete 'ansible_roles/:ansible_role_id', :to => 'hostgroups#remove_ansible_role', :constraints => { id: %r{[^\/]+} }
28
+ put 'ansible_roles/:ansible_role_id', :to => 'hostgroups#add_ansible_role', :constraints => { id: /[^\/]+/ }
29
+ delete 'ansible_roles/:ansible_role_id', :to => 'hostgroups#remove_ansible_role', :constraints => { id: /[^\/]+/ }
30
30
  end
31
31
  collection do
32
32
  post :multiple_play_roles
@@ -36,7 +36,7 @@ Rails.application.routes.draw do
36
36
  end
37
37
  end
38
38
  scope '/ansible' do
39
- constraints(:id => %r{[^\/]+}) do
39
+ constraints(:id => /[^\/]+/) do
40
40
  resources :hosts, :only => [] do
41
41
  member do
42
42
  get :play_roles
@@ -100,7 +100,7 @@ Rails.application.routes.draw do
100
100
  end
101
101
  end
102
102
 
103
- resources :ansible_override_values, :only => [:create, :destroy]
103
+ resources :ansible_override_values, :only => [:create, :destroy, :update]
104
104
 
105
105
  resources :ansible_inventories, :only => [] do
106
106
  collection do
@@ -120,7 +120,7 @@ Foreman::Plugin.register :foreman_ansible do
120
120
  { :lookup_values => [:update],
121
121
  :ansible_variables => [:edit, :update],
122
122
  :'api/v2/ansible_variables' => [:update],
123
- :'api/v2/ansible_override_values' => [:create, :destroy] },
123
+ :'api/v2/ansible_override_values' => [:create, :destroy, :update] },
124
124
  :resource_type => 'AnsibleVariable'
125
125
  permission :destroy_ansible_variables,
126
126
  {
@@ -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.2'
7
+ VERSION = '15.0.3'
8
8
  end
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: 15.0.2
4
+ version: 15.0.3
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-19 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list
@@ -280,83 +280,45 @@ files:
280
280
  - lib/foreman_ansible/version.rb
281
281
  - locale/Makefile
282
282
  - locale/ca/LC_MESSAGES/foreman_ansible.mo
283
- - locale/ca/foreman_ansible.edit.po
284
283
  - locale/ca/foreman_ansible.po
285
- - locale/ca/foreman_ansible.po.time_stamp
286
284
  - locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo
287
- - locale/cs_CZ/foreman_ansible.edit.po
288
285
  - locale/cs_CZ/foreman_ansible.po
289
- - locale/cs_CZ/foreman_ansible.po.time_stamp
290
286
  - locale/de/LC_MESSAGES/foreman_ansible.mo
291
- - locale/de/foreman_ansible.edit.po
292
287
  - locale/de/foreman_ansible.po
293
- - locale/de/foreman_ansible.po.time_stamp
294
288
  - locale/en/LC_MESSAGES/foreman_ansible.mo
295
- - locale/en/foreman_ansible.edit.po
296
289
  - locale/en/foreman_ansible.po
297
- - locale/en/foreman_ansible.po.time_stamp
298
290
  - locale/en_GB/LC_MESSAGES/foreman_ansible.mo
299
- - locale/en_GB/foreman_ansible.edit.po
300
291
  - locale/en_GB/foreman_ansible.po
301
- - locale/en_GB/foreman_ansible.po.time_stamp
302
292
  - locale/es/LC_MESSAGES/foreman_ansible.mo
303
- - locale/es/foreman_ansible.edit.po
304
293
  - locale/es/foreman_ansible.po
305
- - locale/es/foreman_ansible.po.time_stamp
306
294
  - locale/foreman_ansible.pot
307
295
  - locale/fr/LC_MESSAGES/foreman_ansible.mo
308
- - locale/fr/foreman_ansible.edit.po
309
296
  - locale/fr/foreman_ansible.po
310
- - locale/fr/foreman_ansible.po.time_stamp
311
297
  - locale/gemspec.rb
312
298
  - locale/gl/LC_MESSAGES/foreman_ansible.mo
313
- - locale/gl/foreman_ansible.edit.po
314
299
  - locale/gl/foreman_ansible.po
315
- - locale/gl/foreman_ansible.po.time_stamp
316
300
  - locale/it/LC_MESSAGES/foreman_ansible.mo
317
- - locale/it/foreman_ansible.edit.po
318
301
  - locale/it/foreman_ansible.po
319
- - locale/it/foreman_ansible.po.time_stamp
320
302
  - locale/ja/LC_MESSAGES/foreman_ansible.mo
321
- - locale/ja/foreman_ansible.edit.po
322
303
  - locale/ja/foreman_ansible.po
323
- - locale/ja/foreman_ansible.po.time_stamp
324
304
  - locale/ka/LC_MESSAGES/foreman_ansible.mo
325
- - locale/ka/foreman_ansible.edit.po
326
305
  - locale/ka/foreman_ansible.po
327
- - locale/ka/foreman_ansible.po.time_stamp
328
306
  - locale/ko/LC_MESSAGES/foreman_ansible.mo
329
- - locale/ko/foreman_ansible.edit.po
330
307
  - locale/ko/foreman_ansible.po
331
- - locale/ko/foreman_ansible.po.time_stamp
332
308
  - locale/nl_NL/LC_MESSAGES/foreman_ansible.mo
333
- - locale/nl_NL/foreman_ansible.edit.po
334
309
  - locale/nl_NL/foreman_ansible.po
335
- - locale/nl_NL/foreman_ansible.po.time_stamp
336
310
  - locale/pl/LC_MESSAGES/foreman_ansible.mo
337
- - locale/pl/foreman_ansible.edit.po
338
311
  - locale/pl/foreman_ansible.po
339
- - locale/pl/foreman_ansible.po.time_stamp
340
312
  - locale/pt_BR/LC_MESSAGES/foreman_ansible.mo
341
- - locale/pt_BR/foreman_ansible.edit.po
342
313
  - locale/pt_BR/foreman_ansible.po
343
- - locale/pt_BR/foreman_ansible.po.time_stamp
344
314
  - locale/ru/LC_MESSAGES/foreman_ansible.mo
345
- - locale/ru/foreman_ansible.edit.po
346
315
  - locale/ru/foreman_ansible.po
347
- - locale/ru/foreman_ansible.po.time_stamp
348
316
  - locale/sv_SE/LC_MESSAGES/foreman_ansible.mo
349
- - locale/sv_SE/foreman_ansible.edit.po
350
317
  - locale/sv_SE/foreman_ansible.po
351
- - locale/sv_SE/foreman_ansible.po.time_stamp
352
318
  - locale/zh_CN/LC_MESSAGES/foreman_ansible.mo
353
- - locale/zh_CN/foreman_ansible.edit.po
354
319
  - locale/zh_CN/foreman_ansible.po
355
- - locale/zh_CN/foreman_ansible.po.time_stamp
356
320
  - locale/zh_TW/LC_MESSAGES/foreman_ansible.mo
357
- - locale/zh_TW/foreman_ansible.edit.po
358
321
  - locale/zh_TW/foreman_ansible.po
359
- - locale/zh_TW/foreman_ansible.po.time_stamp
360
322
  - package.json
361
323
  - test/factories/ansible_proxy.rb
362
324
  - test/factories/ansible_roles.rb
@@ -548,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
548
510
  - !ruby/object:Gem::Version
549
511
  version: '0'
550
512
  requirements: []
551
- rubygems_version: 3.2.33
513
+ rubygems_version: 3.5.22
552
514
  signing_key:
553
515
  specification_version: 4
554
516
  summary: Ansible integration with Foreman (theforeman.org)