foreman_maintain 1.2.4 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/features/mosquitto.rb +28 -0
- data/definitions/features/sync_plans.rb +11 -1
- data/definitions/features/tar.rb +1 -3
- 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: 193b1e7cefdc871725692b84d03636fab11dcf6a0de8928c7c8ff05179b8ddd8
|
4
|
+
data.tar.gz: afdf239a676685fa3b793e78389d989029f6dd29ec806bb1cef4ee72a91c37fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2305610529e5ff51dc325daaaeee9da689259a0c1aeec88d155c8315d83da7551d0c00b8c5098439986602b039ae85bae3346dc679db184dc08bd856610b3d4
|
7
|
+
data.tar.gz: f0fdf10df80d8a26552c1f74aed56d944b1324ef06fe8960c92aa9d8411cae211f24ff596d60c8a1fff2bae450901c40e9b478889fe118432323fb748ee07d6c
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class Features::Mosquitto < ForemanMaintain::Feature
|
2
|
+
metadata do
|
3
|
+
label :mosquitto
|
4
|
+
|
5
|
+
confine do
|
6
|
+
# Luckily, the service name is the same as the package providing it
|
7
|
+
find_package(service_name)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def services
|
12
|
+
[system_service(self.class.service_name, 10)]
|
13
|
+
end
|
14
|
+
|
15
|
+
def config_files
|
16
|
+
[self.class.etc_prefix]
|
17
|
+
end
|
18
|
+
|
19
|
+
class << self
|
20
|
+
def etc_prefix
|
21
|
+
'/etc/mosquitto'
|
22
|
+
end
|
23
|
+
|
24
|
+
def service_name
|
25
|
+
'mosquitto'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -33,12 +33,22 @@ class Features::SyncPlans < ForemanMaintain::Feature
|
|
33
33
|
feature(:foreman_database).query(query).map { |r| r['id'].to_i }
|
34
34
|
end
|
35
35
|
|
36
|
+
def validate_sync_plan_ids(ids)
|
37
|
+
return [] if ids.empty?
|
38
|
+
|
39
|
+
ids_condition = ids.map { |id| "'#{id}'" }.join(',')
|
40
|
+
query = "SELECT id FROM katello_sync_plans WHERE id IN (#{ids_condition})"
|
41
|
+
feature(:foreman_database).query(query).map { |r| r['id'].to_i }
|
42
|
+
end
|
43
|
+
|
36
44
|
def make_disable(ids)
|
37
45
|
update_records(ids, false)
|
38
46
|
end
|
39
47
|
|
40
48
|
def make_enable
|
41
|
-
|
49
|
+
# remove ids of sync plans which no longer exist in DB
|
50
|
+
@data[:disabled] = validate_sync_plan_ids(@data[:disabled])
|
51
|
+
update_records(@data[:disabled], true)
|
42
52
|
end
|
43
53
|
|
44
54
|
def load_from_storage(storage)
|
data/definitions/features/tar.rb
CHANGED
@@ -51,13 +51,11 @@ class Features::Tar < ForemanMaintain::Feature
|
|
51
51
|
end
|
52
52
|
|
53
53
|
if volume_size
|
54
|
-
split_tar_script = default_split_tar_script
|
55
54
|
tar_command << "--tape-length=#{volume_size}"
|
56
|
-
tar_command << "--new-volume-script=#{split_tar_script}"
|
57
55
|
end
|
58
56
|
|
59
57
|
tar_command << '--overwrite' if options[:overwrite]
|
60
|
-
tar_command << '--gzip'
|
58
|
+
tar_command << (options[:gzip] ? '--gzip' : "--new-volume-script=#{default_split_tar_script}")
|
61
59
|
|
62
60
|
exclude = options.fetch(:exclude, [])
|
63
61
|
exclude.each do |ex|
|
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.2.
|
4
|
+
version: 1.2.6
|
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-02-
|
11
|
+
date: 2023-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- definitions/features/katello.rb
|
218
218
|
- definitions/features/katello_install.rb
|
219
219
|
- definitions/features/mongo.rb
|
220
|
+
- definitions/features/mosquitto.rb
|
220
221
|
- definitions/features/nftables.rb
|
221
222
|
- definitions/features/pulp2.rb
|
222
223
|
- definitions/features/pulpcore.rb
|