foreman_acd 0.9.2.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/foreman_acd/remote_execution_controller.rb +2 -2
- data/app/services/foreman_acd/app_configurator.rb +10 -10
- data/app/services/foreman_acd/inventory_creator.rb +3 -7
- data/lib/foreman_acd/version.rb +1 -1
- data/package.json +1 -1
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 544d3c91bb7090c8c4066a256937514626d263e206f1ab5f01976cbba606f0b6
|
4
|
+
data.tar.gz: 06a4be069deda3be5e2c26407b4303a8e22aa5d4c1f46179c36d60734ad9d13e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb3c928f53da13d0d00308d4a9693b07ab62a792c8f866351d4e8ea027e5d9575963f787171a345e5b66eddacd4747faa5be02eb055698d9c4c5e6cfb7a9468
|
7
|
+
data.tar.gz: 77efce0818807f653dfc726c41f568331dc515b24b0fd3722ce0ec935b8696bfe1de391338f5f8ec04e3e66ee7693f3b88b1daf8239fa89c5ece3885fea3145d
|
data/README.md
CHANGED
@@ -55,7 +55,7 @@ This plugin aims to setup all six hosts and to deploy the application.
|
|
55
55
|
|
56
56
|
## Documentation
|
57
57
|
|
58
|
-
See [Application Centric Deployment
|
58
|
+
See [Deploying Hosts using Application Centric Deployment](https://docs.theforeman.org/nightly/Deploying_Hosts_AppCentric/index-katello.html)
|
59
59
|
|
60
60
|
## Installation
|
61
61
|
|
@@ -10,7 +10,7 @@ module ForemanAcd
|
|
10
10
|
if result.success == true
|
11
11
|
@composer = job
|
12
12
|
else
|
13
|
-
redirect_to(app_instances_path, :error => _("
|
13
|
+
redirect_to(app_instances_path, :error => _("Could not create remote execution job to configure the app '%{app_instance}': %{msg}") % {
|
14
14
|
:app_instance => @app_instance, :msg => result.error
|
15
15
|
})
|
16
16
|
end
|
@@ -23,7 +23,7 @@ module ForemanAcd
|
|
23
23
|
result, job = init_configuration
|
24
24
|
|
25
25
|
unless result.success == true
|
26
|
-
return redirect_to(app_instances_path, :error => _("
|
26
|
+
return redirect_to(app_instances_path, :error => _("Could not create remote execution job to configure the app '%{app_instance}': %{msg}") % {
|
27
27
|
:app_instance => @app_instance, :msg => result.error
|
28
28
|
})
|
29
29
|
end
|
@@ -36,21 +36,20 @@ module ForemanAcd
|
|
36
36
|
# proxy which is necessary to connect to the proxy
|
37
37
|
proxy_selector = RemoteExecutionProxySelector.new
|
38
38
|
hosts.each do |h|
|
39
|
-
|
40
|
-
unless h.host
|
41
|
-
result.success = false
|
42
|
-
result.error = 'App Instance is not deployed'
|
43
|
-
return [result, job]
|
44
|
-
end
|
45
|
-
proxy = proxy_selector.determine_proxy(h.host, 'ACD')
|
46
|
-
result.success = true
|
47
|
-
rescue NoMethodError => e
|
39
|
+
unless h.host
|
48
40
|
result.success = false
|
49
|
-
result.error =
|
41
|
+
result.error = 'App Instance is not deployed'
|
50
42
|
return [result, job]
|
51
43
|
end
|
44
|
+
proxy = proxy_selector.determine_proxy(h.host, 'ACD')
|
45
|
+
raise StandardError.new('Proxy without ACD feature') if proxy.nil? || [:not_available, :not_defined].include?(proxy)
|
52
46
|
proxy_hosts[proxy.name] = [] unless proxy_hosts.key?(proxy.name)
|
53
47
|
proxy_hosts[proxy.name] << h
|
48
|
+
result.success = true
|
49
|
+
rescue StandardError => e
|
50
|
+
result.success = false
|
51
|
+
result.error = "#{e}, Install/Update smart-proxies for ACD"
|
52
|
+
return [result, job]
|
54
53
|
end
|
55
54
|
|
56
55
|
# TODO: just for testing...
|
@@ -90,6 +89,7 @@ module ForemanAcd
|
|
90
89
|
result.success = false
|
91
90
|
result.error = _('Failed to configure hosts: %{err_msg}' % { :err_msg => e.message })
|
92
91
|
logger.error('Failed to configure hosts: %{err_class}: %{err_msg}' % { :err_class => e.class, :err_msg => e.message })
|
92
|
+
logger.error(e.backtrace.join("\n"))
|
93
93
|
job = nil
|
94
94
|
end
|
95
95
|
[result, job]
|
@@ -36,7 +36,7 @@ module ForemanAcd
|
|
36
36
|
|
37
37
|
# in case there is no ansible_user defined, set "root" as default.
|
38
38
|
ansible_vars['ansible_user'] = 'root' unless ansible_vars.key?('ansible_user')
|
39
|
-
ansible_vars['ansible_ssh_private_key_file'] =
|
39
|
+
ansible_vars['ansible_ssh_private_key_file'] = ansible_ssh_private_key(foreman_host.host)
|
40
40
|
|
41
41
|
children[ansible_group]['hosts'][foreman_host.host.name] = ansible_vars
|
42
42
|
end
|
@@ -56,13 +56,9 @@ module ForemanAcd
|
|
56
56
|
resolved_value
|
57
57
|
end
|
58
58
|
|
59
|
-
def
|
59
|
+
def ansible_ssh_private_key(host)
|
60
60
|
ansible_private_file = host_setting(host, 'ansible_ssh_private_key_file')
|
61
|
-
|
62
|
-
ansible_private_file
|
63
|
-
else
|
64
|
-
ForemanRemoteExecutionCore.settings[:ssh_identity_key_file]
|
65
|
-
end
|
61
|
+
ansible_private_file unless ansible_private_file.empty?
|
66
62
|
end
|
67
63
|
|
68
64
|
def host_setting(host, setting)
|
data/lib/foreman_acd/version.rb
CHANGED
data/package.json
CHANGED
@@ -180,6 +180,7 @@ export const initParameterSelection = (
|
|
180
180
|
}, idx++);
|
181
181
|
|
182
182
|
initialState.parameters = parameters;
|
183
|
+
initialState.allowedParameterTypes = [];
|
183
184
|
|
184
185
|
if ((paramType == PARAMETER_SELECTION_PARAM_TYPE_FOREMAN) && (parameters)) {
|
185
186
|
let pTypes = PARAMETER_SELECTION_TYPES;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_acd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|