foreman_maintain 1.0.2 → 1.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 +4 -4
- data/definitions/checks/check_hotfix_installed.rb +3 -1
- data/definitions/checks/foreman_proxy/check_tftp_storage.rb +5 -5
- data/definitions/procedures/puppet/remove_puppet_data.rb +3 -1
- data/definitions/scenarios/puppet.rb +1 -0
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '092ba2224bd80eeef29cbcc522cf6ef3a438094125e8a4ad87e0c99281fdd251'
|
4
|
+
data.tar.gz: 0f71a35dc5325391b51a9648cd633ccf681eae203dfa9b49e6626e2b1bd6b602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5589f427186e871ca4b0fbaba47ac450962ef2a91f72c33209b2b9f67d1c354e84c9f407cb47b686ef9867a82cbfdbc6360c1e312ba41021bc16fa08fa5e7e0c
|
7
|
+
data.tar.gz: 6f2f77e8fe631dee53dd3e9476868d76063d8f1c4fb4b2533c332ca88ab16af0b587901258fe4ab7558bf9fce942263b5717c7ef2717a7c0ea428de266a36991
|
@@ -46,9 +46,11 @@ class Checks::CheckHotfixInstalled < ForemanMaintain::Check
|
|
46
46
|
def installed_packages
|
47
47
|
packages = []
|
48
48
|
repoquery_cmd = execute!('which repoquery')
|
49
|
-
|
49
|
+
query_format = '%{ui_from_repo} %{name}-%{evr}.%{arch}'
|
50
|
+
IO.popen([repoquery_cmd, '-a', '--installed', '--qf', query_format]) do |io|
|
50
51
|
io.each do |line|
|
51
52
|
repo, pkg = line.chomp.split
|
53
|
+
next if repo.nil? || pkg.nil?
|
52
54
|
packages << pkg if /satellite|rhscl/ =~ repo[1..-1].downcase
|
53
55
|
end
|
54
56
|
end
|
@@ -6,12 +6,12 @@ module Checks::ForemanProxy
|
|
6
6
|
tags :default
|
7
7
|
confine do
|
8
8
|
feature(:satellite) && feature(:foreman_proxy) &&
|
9
|
-
feature(:foreman_proxy).features.include?('tftp')
|
9
|
+
feature(:foreman_proxy).features.include?('tftp')
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
def run
|
14
|
-
if Dir.exist?(tftp_boot_directory)
|
14
|
+
if non_zero_token_duration? && Dir.exist?(tftp_boot_directory)
|
15
15
|
files = old_files_from_tftp_boot
|
16
16
|
assert(files.empty?,
|
17
17
|
'There are old initrd and vmlinuz files present in tftp',
|
@@ -29,7 +29,7 @@ module Checks::ForemanProxy
|
|
29
29
|
end.compact
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def non_zero_token_duration?
|
33
33
|
lookup_token_duration != 0
|
34
34
|
end
|
35
35
|
|
@@ -38,10 +38,10 @@ module Checks::ForemanProxy
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def token_duration
|
41
|
-
@token_duration ||=
|
41
|
+
@token_duration ||= lookup_token_duration
|
42
42
|
end
|
43
43
|
|
44
|
-
def
|
44
|
+
def lookup_token_duration
|
45
45
|
data = feature(:foreman_database). \
|
46
46
|
query("select s.value, s.default from settings s \
|
47
47
|
where category IN ('Setting::Provisioning','Setting') \
|
@@ -14,6 +14,7 @@ module ForemanMaintain::Scenarios
|
|
14
14
|
add_step(Checks::CheckPuppetCapsules) if server?
|
15
15
|
add_step(Procedures::Puppet::RemovePuppet)
|
16
16
|
add_step(Procedures::Puppet::RemovePuppetData) if context.get(:remove_data)
|
17
|
+
add_step(Procedures::Service::Restart)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
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.0.
|
4
|
+
version: 1.0.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: 2022-
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|