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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7444a04a97d0c557274185beac9aad2690a7b2387737e48b2932603143fc13bb
4
- data.tar.gz: 3cff7fecc5b68fa7f038bff0482e40a7964fbc02375b6b09961ca9ff5a13a457
3
+ metadata.gz: 544d3c91bb7090c8c4066a256937514626d263e206f1ab5f01976cbba606f0b6
4
+ data.tar.gz: 06a4be069deda3be5e2c26407b4303a8e22aa5d4c1f46179c36d60734ad9d13e
5
5
  SHA512:
6
- metadata.gz: 0aa2b65dc7476d0c1791eceb1c568e6c140562262a4f6f496279da2d6a0b65ad19be14b7e519ebbaf5be3724d2483e1ce0c357ba20d443aa705101632215d97a
7
- data.tar.gz: a4d80115ee182a4c9b193afcf43e2ea8a16e4dd715f58120df17d8e5c8c87fb0f2a12dd56883d9f42bdce6298dac074b3a0671fdd9a48f5a6d83ddf940cf3e06
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 Guide](https://docs.theforeman.org/nightly/Application_Centric_Deployment/index-foreman-el.html)
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 => _("Coult not create remote execution job to configure the app '%{app_instance}': %{msg}") % {
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 => _("Coult not create remote execution job to configure the app '%{app_instance}': %{msg}") % {
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
- begin
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 = "#{e}, Install/Update smart-proxies for ACD"
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'] = ansible_or_rex_ssh_private_key(foreman_host.host)
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 ansible_or_rex_ssh_private_key(host)
59
+ def ansible_ssh_private_key(host)
60
60
  ansible_private_file = host_setting(host, 'ansible_ssh_private_key_file')
61
- if !ansible_private_file.empty?
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanAcd
4
- VERSION = '0.9.2.3'
4
+ VERSION = '0.9.4'
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_acd",
3
- "version": "0.9.2.3",
3
+ "version": "0.9.3",
4
4
  "description": "foreman application centric deployment",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -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.2.3
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: 2022-05-02 00:00:00.000000000 Z
11
+ date: 2023-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop