foreman_maintain 1.2.4 → 1.2.5
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 +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f3a8ccaafca99807806029569f3f36ae2510fad72f8c4e38cc5151dc90b0f5
|
4
|
+
data.tar.gz: 37af7fa939b29079d404a1d6461f4425e53b35574a9a76829b7effcadf698443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 198249fe85fdddfe42c8c6b5ba737653f4fd0beeda3283c5e2cacebaf4b4f4207de80d0228fb829326ff906ebcc8b3d147a60ff77f4000e07251078fdd533ad7
|
7
|
+
data.tar.gz: 825a02508773fe67342e78e34dac185338eee5ccd24ace18df3d56255705b1e2cc76f986d827a0712d7112821c2027cfe6dc4402a30f08d6093a99fb4bc8d47d
|
@@ -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
|
+
ids_condition = ids.map { |id| "'#{id}'" }.join(',')
|
38
|
+
query = <<-SQL
|
39
|
+
SELECT id FROM katello_sync_plans WHERE id IN (#{ids_condition})
|
40
|
+
SQL
|
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.5
|
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-22 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
|
@@ -496,7 +497,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
496
497
|
- !ruby/object:Gem::Version
|
497
498
|
version: '0'
|
498
499
|
requirements: []
|
499
|
-
rubygems_version: 3.
|
500
|
+
rubygems_version: 3.2.33
|
500
501
|
signing_key:
|
501
502
|
specification_version: 4
|
502
503
|
summary: Foreman maintenance tool belt
|