foreman_maintain 1.6.0 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/procedures/packages/enable_modules.rb +2 -2
- data/definitions/procedures/packages/switch_modules.rb +16 -0
- data/definitions/scenarios/upgrade_to_capsule_6_16.rb +11 -10
- data/definitions/scenarios/upgrade_to_foreman_nightly.rb +2 -0
- data/definitions/scenarios/upgrade_to_katello_nightly.rb +2 -0
- data/definitions/scenarios/upgrade_to_satellite_6_16.rb +11 -9
- data/lib/foreman_maintain/package_manager/base.rb +5 -0
- data/lib/foreman_maintain/package_manager/dnf.rb +8 -0
- 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: bffec6895a006066de751609395b0f865e1dee34b90d01111d2792af59a6b893
|
4
|
+
data.tar.gz: 9388cc01c5be3b68685e7947676119c5fd648a02c0e73bdafb8f8752f7390c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcdee36a3f44d9809a65b7105f073ed79c10e60d16d34eb4300c1e4ebb4b32255d297b8d9c3eeca346d6865dd88f0c4a5dd66b297dbcea81f8b6d6c0a42ea039
|
7
|
+
data.tar.gz: 90be6369c664ca1fc46b81040a43599b02ba7c2fd26aed1ce628680d750147a3d982593d7cb8694fa3ea6935440ed8eec5bbcd1d78ce98dd79f5a8e8b7b347ac
|
@@ -3,14 +3,14 @@ module Procedures::Packages
|
|
3
3
|
metadata do
|
4
4
|
description 'Enable the given stream modules'
|
5
5
|
confine do
|
6
|
-
package_manager.
|
6
|
+
package_manager.modules_supported?
|
7
7
|
end
|
8
8
|
param :module_names, 'Module names', :array => true, :required => true
|
9
9
|
advanced_run false
|
10
10
|
end
|
11
11
|
|
12
12
|
def run
|
13
|
-
|
13
|
+
package_manager.enable_module(@module_names.join(' '))
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Procedures::Packages
|
2
|
+
class SwitchModules < ForemanMaintain::Procedure
|
3
|
+
metadata do
|
4
|
+
description 'Switch the given stream modules'
|
5
|
+
confine do
|
6
|
+
package_manager.modules_supported?
|
7
|
+
end
|
8
|
+
param :module_names, 'Module names', :array => true, :required => true
|
9
|
+
advanced_run false
|
10
|
+
end
|
11
|
+
|
12
|
+
def run
|
13
|
+
package_manager.switch_module(@module_names.join(' '))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -39,16 +39,6 @@ module Scenarios::Capsule_6_16
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def compose
|
42
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
|
43
|
-
if el8?
|
44
|
-
modules_to_enable = ["satellite-capsule:#{el_short_name}"]
|
45
|
-
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
46
|
-
end
|
47
|
-
add_step(Procedures::Packages::Update.new(
|
48
|
-
:assumeyes => true,
|
49
|
-
:dnf_options => ['--downloadonly']
|
50
|
-
))
|
51
|
-
|
52
42
|
add_steps(find_procedures(:pre_migrations))
|
53
43
|
end
|
54
44
|
end
|
@@ -64,6 +54,17 @@ module Scenarios::Capsule_6_16
|
|
64
54
|
end
|
65
55
|
|
66
56
|
def compose
|
57
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
|
58
|
+
if el8?
|
59
|
+
modules_to_switch = ['postgresql:13']
|
60
|
+
add_step(Procedures::Packages::SwitchModules.new(:module_names => modules_to_switch))
|
61
|
+
modules_to_enable = ["satellite-capsule:#{el_short_name}"]
|
62
|
+
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
63
|
+
end
|
64
|
+
add_step(Procedures::Packages::Update.new(
|
65
|
+
:assumeyes => true,
|
66
|
+
:dnf_options => ['--downloadonly']
|
67
|
+
))
|
67
68
|
add_step(Procedures::Service::Stop.new)
|
68
69
|
add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
|
69
70
|
add_step_with_context(Procedures::Installer::Run)
|
@@ -53,6 +53,8 @@ module Scenarios::Foreman_Nightly
|
|
53
53
|
def compose
|
54
54
|
add_step(Procedures::Repositories::Setup.new(:version => 'nightly'))
|
55
55
|
if el8?
|
56
|
+
modules_to_switch = ['postgresql:13']
|
57
|
+
add_step(Procedures::Packages::SwitchModules.new(:module_names => modules_to_switch))
|
56
58
|
modules_to_enable = ["foreman:#{el_short_name}"]
|
57
59
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
58
60
|
end
|
@@ -53,6 +53,8 @@ module Scenarios::Katello_Nightly
|
|
53
53
|
def compose
|
54
54
|
add_step(Procedures::Repositories::Setup.new(:version => 'nightly'))
|
55
55
|
if el8?
|
56
|
+
modules_to_switch = ['postgresql:13']
|
57
|
+
add_step(Procedures::Packages::SwitchModules.new(:module_names => modules_to_switch))
|
56
58
|
modules_to_enable = ["katello:#{el_short_name}", "pulpcore:#{el_short_name}"]
|
57
59
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
58
60
|
end
|
@@ -39,15 +39,6 @@ module Scenarios::Satellite_6_16
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def compose
|
42
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
|
43
|
-
if el8?
|
44
|
-
modules_to_enable = ["satellite:#{el_short_name}"]
|
45
|
-
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
46
|
-
end
|
47
|
-
add_step(Procedures::Packages::Update.new(
|
48
|
-
:assumeyes => true,
|
49
|
-
:dnf_options => ['--downloadonly']
|
50
|
-
))
|
51
42
|
add_steps(find_procedures(:pre_migrations))
|
52
43
|
end
|
53
44
|
end
|
@@ -64,6 +55,17 @@ module Scenarios::Satellite_6_16
|
|
64
55
|
end
|
65
56
|
|
66
57
|
def compose
|
58
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
|
59
|
+
if el8?
|
60
|
+
modules_to_switch = ['postgresql:13']
|
61
|
+
add_step(Procedures::Packages::SwitchModules.new(:module_names => modules_to_switch))
|
62
|
+
modules_to_enable = ["satellite:#{el_short_name}"]
|
63
|
+
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
64
|
+
end
|
65
|
+
add_step(Procedures::Packages::Update.new(
|
66
|
+
:assumeyes => true,
|
67
|
+
:dnf_options => ['--downloadonly']
|
68
|
+
))
|
67
69
|
add_step(Procedures::Service::Stop.new)
|
68
70
|
add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
|
69
71
|
add_step_with_context(Procedures::Installer::Run)
|
@@ -95,6 +95,10 @@ module ForemanMaintain::PackageManager
|
|
95
95
|
dnf_action('clean', 'metadata', :assumeyes => assumeyes)
|
96
96
|
end
|
97
97
|
|
98
|
+
def modules_supported?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
98
102
|
def module_enabled?(name)
|
99
103
|
_status, result = info(name)
|
100
104
|
result.match?(/Stream.+\[e\].+/)
|
@@ -104,6 +108,10 @@ module ForemanMaintain::PackageManager
|
|
104
108
|
dnf_action('module enable', name, assumeyes: true)
|
105
109
|
end
|
106
110
|
|
111
|
+
def switch_module(name)
|
112
|
+
dnf_action('module switch-to', name, assumeyes: true)
|
113
|
+
end
|
114
|
+
|
107
115
|
def module_exists?(name)
|
108
116
|
status, _result = info(name)
|
109
117
|
status == 0
|
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: 1.6.
|
4
|
+
version: 1.6.2
|
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: 2024-03-
|
11
|
+
date: 2024-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -268,6 +268,7 @@ files:
|
|
268
268
|
- definitions/procedures/packages/installer_confirmation.rb
|
269
269
|
- definitions/procedures/packages/lock_versions.rb
|
270
270
|
- definitions/procedures/packages/locking_status.rb
|
271
|
+
- definitions/procedures/packages/switch_modules.rb
|
271
272
|
- definitions/procedures/packages/uninstall.rb
|
272
273
|
- definitions/procedures/packages/unlock_versions.rb
|
273
274
|
- definitions/procedures/packages/update.rb
|