manageiq-appliance_console 2.0.2 → 2.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '01151816500b80c49674ed6063ce8af2b732da048bcbcf3b39e4462acd6cc5fd'
4
- data.tar.gz: 8ec934a3b7a9a6b350b295bec3a1e4c03c9e51ad2f8ba57cdedb3c032de51455
3
+ metadata.gz: f59f9d77ab02be6293d6bd474900980c461250cddf3ce5368db1dace2caaef74
4
+ data.tar.gz: a10f9b18db83b9cb574f76efe167e313df58fb995ce2e28a14741b87cf331763
5
5
  SHA512:
6
- metadata.gz: 1e333fea67f0f233844fef49a344b3eccdf9c30011938768b9dcea61666a35573d5e51e98bb10ee656985d6284f24a384a3c0fdb7171b21dc7c34db34d45d479
7
- data.tar.gz: 01b0b87561bcfc018ce5eb487346878d167101579de130545bbc235b17eab6a0c1b0143796fd13e0352d15d7ea3c25e825303134e6436f6dbb198fd5f6fea2d6
6
+ metadata.gz: 2a84fe3d01bb6dde2a23fc94c07cd0372de7b485e57cab57bdcf923e176a74b9269f2fb0de2181567b1ae8a364d72f3b881ad8715f726c4290ac115feedf8c89
7
+ data.tar.gz: 1e443c7cb4901e7afbd937959ce95164ded4f83afe1994691bad72d95b657925394d8eb4518a82027c3f05fab0b41e75cdda839de329e798d7348e3fc4bbc1e7
@@ -40,6 +40,24 @@ def summary_entry(field, value)
40
40
  "#{dfield.ljust(24)} #{value}"
41
41
  end
42
42
 
43
+ def ensure_key_configured
44
+ key_config = ManageIQ::ApplianceConsole::KeyConfiguration.new
45
+ unless key_config.key_exist?
46
+ say "No encryption key found.\n"
47
+ say "For migrations, copy encryption key from a hardened appliance."
48
+ say "For worker and multi-region setups, copy key from another appliance.\n"
49
+ say "If this is your first appliance, just generate one now.\n\n"
50
+
51
+ if key_config.ask_question_loop
52
+ say("\nEncryption key now configured.\n\n")
53
+ else
54
+ say("\nEncryption key not configured.")
55
+ press_any_key
56
+ raise MiqSignalError
57
+ end
58
+ end
59
+ end
60
+
43
61
  [:INT, :TERM, :ABRT, :TSTP].each { |s| trap(s) { raise MiqSignalError } }
44
62
 
45
63
  VERSION_FILE = ManageIQ::ApplianceConsole::RAILS_ROOT.join("VERSION")
@@ -73,24 +91,6 @@ CLOUD_INIT_DISABLE_NETWORK_CONFIG = "network: {config: disabled}\n".freeze
73
91
 
74
92
  module ManageIQ
75
93
  module ApplianceConsole
76
- def ensure_key_configured
77
- key_config = ManageIQ::ApplianceConsole::KeyConfiguration.new
78
- unless key_config.key_exist?
79
- say "No encryption key found.\n"
80
- say "For migrations, copy encryption key from a hardened appliance."
81
- say "For worker and multi-region setups, copy key from another appliance.\n"
82
- say "If this is your first appliance, just generate one now.\n\n"
83
-
84
- if key_config.ask_question_loop
85
- say("\nEncryption key now configured.\n\n")
86
- else
87
- say("\nEncryption key not configured.")
88
- press_any_key
89
- raise MiqSignalError
90
- end
91
- end
92
- end
93
-
94
94
  eth0 = LinuxAdmin::NetworkInterface.new(NETWORK_INTERFACE)
95
95
  # Because it takes a few seconds, get the region once in the outside loop
96
96
  region = ManageIQ::ApplianceConsole::DatabaseConfiguration.region
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module ApplianceConsole
3
- VERSION = '2.0.2'.freeze
3
+ VERSION = '2.0.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-appliance_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-02 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord