foreman_maintain 1.6.0 → 1.6.1
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 +2 -0
- 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 +2 -0
- 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: 548814bfe86ff4c1e83329ac60bbbf5b9502f6cc77c258d82cb7fa5777a00fdf
|
4
|
+
data.tar.gz: c16c7ee88083f281e69cedbe605990c9e3b54e5e15f3ba4aaa0b3e3b1d5acc10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e37f22cb90fcd75430b186cb468dc58c7d625c52ec104427119f6e88d1f6d511d98dbedbfff1c9293abd29816156e936d3bb70ada7c21cfb4c1cdca61f2d255e
|
7
|
+
data.tar.gz: 236e8c299154a4d132506995933f30d8f11ccaf1fdba5756844bc5d9b978d0ce7bd1fa65a2fe5d51abd9e2925e54bf634c083897b1ef14d410e38f4d54ad032e
|
@@ -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
|
@@ -41,6 +41,8 @@ module Scenarios::Capsule_6_16
|
|
41
41
|
def compose
|
42
42
|
add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
|
43
43
|
if el8?
|
44
|
+
modules_to_switch = ['postgresql:13']
|
45
|
+
add_step(Procedures::Packages::SwitchModules.new(:module_names => modules_to_switch))
|
44
46
|
modules_to_enable = ["satellite-capsule:#{el_short_name}"]
|
45
47
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
46
48
|
end
|
@@ -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
|
@@ -41,6 +41,8 @@ module Scenarios::Satellite_6_16
|
|
41
41
|
def compose
|
42
42
|
add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
|
43
43
|
if el8?
|
44
|
+
modules_to_switch = ['postgresql:13']
|
45
|
+
add_step(Procedures::Packages::SwitchModules.new(:module_names => modules_to_switch))
|
44
46
|
modules_to_enable = ["satellite:#{el_short_name}"]
|
45
47
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
46
48
|
end
|
@@ -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.1
|
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-18 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
|