foreman_maintain 1.1.12 → 1.1.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b107bb35fc13fe807736e7bee91e6248335f03cd7ee254108d238f7e3f838dd3
|
4
|
+
data.tar.gz: ef3d49ecbd7753101de6e1729e8a1365c790e0c6cacc154614177140b5866963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18700fc8376da5b92903d67b8cd85aed9005b7974d45cb0c3943e63a00c9c79684671e2e320e2e96e9d5cd63c11cf17861407abb3ce24399f3a8eea2b1913484
|
7
|
+
data.tar.gz: d56a5be7d5ebddf6663b25c6dbbf95d526d5d05eeb19b1cd8002b38056c391fc1c60cb5e9e4138db6121da2103806c5332c9ba6330e2e727b50fafb384105ba4
|
@@ -59,6 +59,8 @@ module ForemanMaintain::Scenarios
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def compose
|
62
|
+
ForemanMaintain.enable_maintenance_module
|
63
|
+
|
62
64
|
if check_min_version('foreman', '2.5') || check_min_version('foreman-proxy', '2.5')
|
63
65
|
pkgs_to_update = %w[satellite-maintain rubygem-foreman_maintain]
|
64
66
|
yum_options = req_repos_to_update_pkgs.map do |id|
|
@@ -9,6 +9,24 @@ module ForemanMaintain::PackageManager
|
|
9
9
|
true
|
10
10
|
end
|
11
11
|
|
12
|
+
def module_enabled?(name)
|
13
|
+
_status, result = info(name)
|
14
|
+
result.match?(/Stream.+\[e\].+/)
|
15
|
+
end
|
16
|
+
|
17
|
+
def enable_module(name)
|
18
|
+
dnf_action('module enable', name, assumeyes: true)
|
19
|
+
end
|
20
|
+
|
21
|
+
def module_exists?(name)
|
22
|
+
status, _result = info(name)
|
23
|
+
status == 0
|
24
|
+
end
|
25
|
+
|
26
|
+
def info(name)
|
27
|
+
dnf_action('module info', name, with_status: true, assumeyes: true)
|
28
|
+
end
|
29
|
+
|
12
30
|
private
|
13
31
|
|
14
32
|
def dnf_action(action, packages, with_status: false, assumeyes: false)
|
data/lib/foreman_maintain.rb
CHANGED
@@ -175,6 +175,9 @@ module ForemanMaintain
|
|
175
175
|
package_name, command = pkg_and_cmd_name
|
176
176
|
|
177
177
|
puts "Checking for new version of #{package_name}..."
|
178
|
+
|
179
|
+
enable_maintenance_module
|
180
|
+
|
178
181
|
if ForemanMaintain.package_manager.update_available?(main_package_name)
|
179
182
|
puts "\nUpdating #{package_name} package."
|
180
183
|
ForemanMaintain.package_manager.update(main_package_name, :assumeyes => true)
|
@@ -185,6 +188,19 @@ module ForemanMaintain
|
|
185
188
|
puts "Nothing to update, can't find new version of #{package_name}."
|
186
189
|
end
|
187
190
|
|
191
|
+
def enable_maintenance_module
|
192
|
+
return unless el? && !el7?
|
193
|
+
|
194
|
+
maintenance_module = 'satellite-maintenance:el8'
|
195
|
+
package_manager = ForemanMaintain.package_manager
|
196
|
+
|
197
|
+
if package_manager.module_exists?(maintenance_module) &&
|
198
|
+
!package_manager.module_enabled?(maintenance_module)
|
199
|
+
puts "\nEnabling #{maintenance_module} module"
|
200
|
+
package_manager.enable_module(maintenance_module)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
188
204
|
def main_package_name
|
189
205
|
'rubygem-foreman_maintain'
|
190
206
|
end
|
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.1.
|
4
|
+
version: 1.1.14
|
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: 2023-
|
11
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|