foreman_ansible 14.2.2 → 15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ansible_roles_controller.rb +1 -1
- data/app/controllers/ansible_variables_controller.rb +1 -1
- data/app/controllers/api/v2/ansible_roles_controller.rb +1 -1
- data/app/controllers/ui_ansible_roles_controller.rb +1 -1
- data/app/jobs/sync_roles_and_variables.rb +1 -1
- data/app/services/foreman_ansible/api_roles_importer.rb +1 -1
- data/app/services/foreman_ansible/ui_roles_importer.rb +1 -1
- data/lib/foreman_ansible/engine.rb +4 -10
- data/lib/foreman_ansible/register.rb +1 -1
- data/lib/foreman_ansible/version.rb +1 -1
- data/test/functional/ansible_variables_controller_test.rb +1 -1
- data/test/functional/ui_ansible_roles_controller_test.rb +1 -1
- data/test/unit/services/ui_roles_importer_test.rb +3 -3
- metadata +11 -11
- /data/app/jobs/{sync_playbooks.rb → import_playbooks_job/async/sync_playbooks.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5de249140ded5fdd285662ec692ec39aa59c066ca137c0fd64b7907907887969
|
4
|
+
data.tar.gz: 999b39a3daa7333adda1dda9ee5b552ef28879790fa54409ee0d8fb3cea1f969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bfb0de5ef66c6a93bff6e7f7a32ac8fd15ddbb37f12a146f431b3fe98e8289e4b0a192c6fdfd40e0b47c60cda4f6074d392d5f0f0626be5f49ac1e07f8968bd
|
7
|
+
data.tar.gz: abf362e2b9e6db0eccbe238043735ba9e305483ddf39eebf1e235d78c5c39dce1fac034136063bf8ab16430721cb5a43fc546119bb30828af61e0757d1a8da67
|
@@ -46,7 +46,7 @@ class AnsibleRolesController < ::ApplicationController
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def create_importer
|
49
|
-
@importer = ForemanAnsible::
|
49
|
+
@importer = ForemanAnsible::UIRolesImporter.new(@proxy)
|
50
50
|
@variables_importer = ForemanAnsible::VariablesImporter.new(@proxy)
|
51
51
|
end
|
52
52
|
|
@@ -92,7 +92,7 @@ class AnsibleVariablesController < ::LookupKeysController
|
|
92
92
|
|
93
93
|
def create_importer
|
94
94
|
@importer = ForemanAnsible::VariablesImporter.new(@proxy)
|
95
|
-
@importer_roles = ForemanAnsible::
|
95
|
+
@importer_roles = ForemanAnsible::UIRolesImporter.new(@proxy)
|
96
96
|
end
|
97
97
|
|
98
98
|
def find_required_proxy
|
@@ -98,7 +98,7 @@ module Api
|
|
98
98
|
# rubocop:enable Layout/DotPosition
|
99
99
|
|
100
100
|
def create_importer
|
101
|
-
@roles_importer = ForemanAnsible::
|
101
|
+
@roles_importer = ForemanAnsible::UIRolesImporter.new(@proxy)
|
102
102
|
@variables_importer = ForemanAnsible::VariablesImporter.new(@proxy)
|
103
103
|
@importer = ForemanAnsible::ApiRolesImporter.new(@proxy)
|
104
104
|
end
|
@@ -2,7 +2,7 @@ class SyncRolesAndVariables < ::ApplicationJob
|
|
2
2
|
queue_as :default
|
3
3
|
|
4
4
|
def perform(changed, proxy)
|
5
|
-
roles_importer = ForemanAnsible::
|
5
|
+
roles_importer = ForemanAnsible::UIRolesImporter.new(proxy)
|
6
6
|
variables_importer = ForemanAnsible::VariablesImporter.new(proxy)
|
7
7
|
roles_importer.finish_import(changed)
|
8
8
|
variables_importer.import_variables_roles(changed) if changed['new'] || changed['old']
|
@@ -6,7 +6,7 @@ module ForemanAnsible
|
|
6
6
|
include ::ForemanAnsible::AnsibleRolesDataPreparations
|
7
7
|
|
8
8
|
def import!(role_names)
|
9
|
-
@roles_importer = ForemanAnsible::
|
9
|
+
@roles_importer = ForemanAnsible::UIRolesImporter.new(@ansible_proxy)
|
10
10
|
@variables_importer = ForemanAnsible::VariablesImporter.new(@ansible_proxy)
|
11
11
|
params = { 'changed' => {} }
|
12
12
|
roles = prepare_ansible_import_rows(@roles_importer.import!, @variables_importer, false)
|
@@ -11,16 +11,10 @@ module ForemanAnsible
|
|
11
11
|
class Engine < ::Rails::Engine
|
12
12
|
engine_name 'foreman_ansible'
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
config.autoload_paths += Dir["#{config.root}/app/services"]
|
19
|
-
config.autoload_paths += Dir["#{config.root}/app/views"]
|
20
|
-
config.autoload_paths += Dir["#{config.root}/app/lib"]
|
21
|
-
|
22
|
-
initializer 'foreman_ansible.register_plugin', :before => :finisher_hook do
|
23
|
-
require 'foreman_ansible/register'
|
14
|
+
initializer 'foreman_ansible.register_plugin', :before => :finisher_hook do |app|
|
15
|
+
app.reloader.to_prepare do
|
16
|
+
require 'foreman_ansible/register'
|
17
|
+
end
|
24
18
|
end
|
25
19
|
|
26
20
|
initializer('foreman_ansible.require_dynflow',
|
@@ -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::
|
28
|
+
ForemanAnsible::UIRolesImporter.any_instance.
|
29
29
|
expects(:import_role_names).returns({})
|
30
30
|
|
31
31
|
get :import,
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'test_plugin_helper'
|
4
|
-
# unit tests for
|
5
|
-
class
|
4
|
+
# unit tests for UIRolesImporter
|
5
|
+
class UIRolesImporterTest < ActiveSupport::TestCase
|
6
6
|
setup do
|
7
7
|
changed_roles
|
8
|
-
@importer = ForemanAnsible::
|
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:
|
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-09-
|
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,40 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '14.0'
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '
|
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: '
|
57
|
+
version: '14.0'
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
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: '
|
67
|
+
version: '10.0'
|
68
68
|
- - "<"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
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: '
|
77
|
+
version: '10.0'
|
78
78
|
- - "<"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
80
|
+
version: '11'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: theforeman-rubocop
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,7 @@ files:
|
|
163
163
|
- app/helpers/foreman_ansible/ansible_roles_helper.rb
|
164
164
|
- app/helpers/foreman_ansible/hosts_helper.rb
|
165
165
|
- app/helpers/foreman_ansible/smart_proxies_helper.rb
|
166
|
-
- app/jobs/sync_playbooks.rb
|
166
|
+
- app/jobs/import_playbooks_job/async/sync_playbooks.rb
|
167
167
|
- app/jobs/sync_roles_and_variables.rb
|
168
168
|
- app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
|
169
169
|
- app/lib/proxy_api/ansible.rb
|
File without changes
|