foreman_maintain 0.8.2 → 0.8.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 +4 -4
- data/definitions/procedures/refresh_features.rb +9 -0
- data/definitions/scenarios/upgrade_to_capsule_6_10.rb +1 -0
- data/definitions/scenarios/upgrade_to_satellite_6_10.rb +1 -0
- data/lib/foreman_maintain.rb +4 -0
- data/lib/foreman_maintain/cli/base.rb +18 -10
- data/lib/foreman_maintain/cli/packages_command.rb +6 -6
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4153054fabffdccbe07a9eed2689b4352077c3c4be62b92042dc20c885677a76
|
4
|
+
data.tar.gz: 68d332ebb071f25e585c0e866b0a85fa7efccd3820640452afcd06f5910860cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e431d1063f9b866d5300cc8de0a07d72c4b6542c8e974c3bec906e77bab465d54b8b68285d2c85ad12453a28fe4a7e20fd9d3ad01cb4493c65f2930418d1c58f
|
7
|
+
data.tar.gz: d39d2fcaaa8b0e90ac9fefd56e66bdc30e695078e853e3006d79c1204d90b08c4a39f41196bbf55888c47a995be9e276e6dd8b84016e85ced883c8d91655ffa8
|
data/lib/foreman_maintain.rb
CHANGED
@@ -152,23 +152,31 @@ module ForemanMaintain
|
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
|
-
|
155
|
+
# rubocop:disable Metrics/MethodLength
|
156
|
+
def self.interactive_option(opts = %w[assumeyes whitelist force])
|
156
157
|
delete_duplicate_assumeyes_if_any
|
157
158
|
|
158
|
-
|
159
|
-
|
160
|
-
|
159
|
+
if opts.include?('assumeyes')
|
160
|
+
option ['-y', '--assumeyes'], :flag,
|
161
|
+
'Automatically answer yes for all questions' do |assume|
|
162
|
+
ForemanMaintain.reporter.assumeyes = assume
|
163
|
+
end
|
161
164
|
end
|
162
165
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
166
|
+
if opts.include?('whitelist')
|
167
|
+
option(['-w', '--whitelist'], 'whitelist',
|
168
|
+
'Comma-separated list of labels of steps to be skipped') do |whitelist|
|
169
|
+
raise ArgumentError, 'value not specified' if whitelist.nil? || whitelist.empty?
|
170
|
+
whitelist.split(',').map(&:strip)
|
171
|
+
end
|
167
172
|
end
|
168
173
|
|
169
|
-
|
170
|
-
|
174
|
+
if opts.include?('force')
|
175
|
+
option ['-f', '--force'], :flag,
|
176
|
+
'Force steps that would be skipped as they were already run'
|
177
|
+
end
|
171
178
|
end
|
179
|
+
# rubocop:enable Metrics/MethodLength
|
172
180
|
|
173
181
|
def self.service_options
|
174
182
|
option '--exclude', 'EXCLUDE', 'A comma-separated list of services to skip'
|
@@ -2,28 +2,28 @@ module ForemanMaintain
|
|
2
2
|
module Cli
|
3
3
|
class PackagesCommand < Base
|
4
4
|
subcommand 'lock', 'Prevent packages from automatic update' do
|
5
|
-
interactive_option
|
5
|
+
interactive_option(['assumeyes'])
|
6
6
|
def execute
|
7
7
|
run_scenarios_and_exit(Scenarios::Packages::Lock.new)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
subcommand 'unlock', 'Enable packages for automatic update' do
|
12
|
-
interactive_option
|
12
|
+
interactive_option(['assumeyes'])
|
13
13
|
def execute
|
14
14
|
run_scenarios_and_exit(Scenarios::Packages::Unlock.new)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
subcommand 'status', 'Check if packages are protected against update' do
|
19
|
-
interactive_option
|
19
|
+
interactive_option(['assumeyes'])
|
20
20
|
def execute
|
21
21
|
run_scenarios_and_exit(Scenarios::Packages::Status.new)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
subcommand 'install', 'Install packages in an unlocked session' do
|
26
|
-
interactive_option
|
26
|
+
interactive_option(['assumeyes'])
|
27
27
|
parameter 'PACKAGES ...', 'packages to install', :attribute_name => :packages
|
28
28
|
|
29
29
|
def execute
|
@@ -37,7 +37,7 @@ module ForemanMaintain
|
|
37
37
|
end
|
38
38
|
|
39
39
|
subcommand 'update', 'Update packages in an unlocked session' do
|
40
|
-
interactive_option
|
40
|
+
interactive_option(['assumeyes'])
|
41
41
|
parameter '[PACKAGES] ...', 'packages to update', :attribute_name => :packages
|
42
42
|
|
43
43
|
def execute
|
@@ -51,7 +51,7 @@ module ForemanMaintain
|
|
51
51
|
end
|
52
52
|
|
53
53
|
subcommand 'is-locked', 'Check if update of packages is allowed' do
|
54
|
-
interactive_option
|
54
|
+
interactive_option([])
|
55
55
|
def execute
|
56
56
|
locked = ForemanMaintain.package_manager.versions_locked?
|
57
57
|
puts "Packages are#{locked ? '' : ' not'} locked"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06
|
11
|
+
date: 2021-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- definitions/procedures/pulp/remove.rb
|
266
266
|
- definitions/procedures/pulpcore/migrate.rb
|
267
267
|
- definitions/procedures/puppet/delete_empty_ca_cert_request_files.rb
|
268
|
+
- definitions/procedures/refresh_features.rb
|
268
269
|
- definitions/procedures/remote_execution/remove_existing_settingsd.rb
|
269
270
|
- definitions/procedures/repositories/disable.rb
|
270
271
|
- definitions/procedures/repositories/setup.rb
|