puppet_metadata 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/puppet_metadata/beaker.rb +19 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd0637a24f15f5fbe1876402af082cfdb245d68683de8397dd11703cdc996788
|
4
|
+
data.tar.gz: 5ec9738ce657cc4dba65d4af0a4b40093acdd934fcf1d302001efae788633fdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 444af6b66b4dc964b254767c1f8fed67219e7e0d7e8504318700d50f3cca7e2cba367b32a75c871b36b1089a65af016322522086b6d0a197658f34b70f175520
|
7
|
+
data.tar.gz: 873eb62634fb24e2a904225ceb730e1349c8f216a475e530601b1724d7bc35ad08c6e34b9ef3afe38f5cfb8dabcb64bbaab74a04dbae75e7d8f323c6f40652c8
|
@@ -12,13 +12,16 @@ module PuppetMetadata
|
|
12
12
|
# @param [String] release The OS release
|
13
13
|
# @param [Boolean] use_fqdn
|
14
14
|
# Whether or not to use a FQDN, ensuring a domain
|
15
|
-
# @param [Boolean] pidfile_workaround
|
15
|
+
# @param [Boolean, Array[String]] pidfile_workaround
|
16
16
|
# Whether or not to apply the systemd PIDFile workaround. This is only
|
17
17
|
# needed when the daemon uses PIDFile in its service file and using
|
18
18
|
# Docker as a Beaker hypervisor. This is to work around Docker's
|
19
19
|
# limitations.
|
20
|
+
# When a boolean, it's applied on applicable operating systems. On arrays
|
21
|
+
# it's applied only when os is included in the provided array.
|
20
22
|
#
|
21
|
-
# @return [
|
23
|
+
# @return [nil] If no setfile is available
|
24
|
+
# @return [Array<(String, String)>] The beaker setfile description with a readable name
|
22
25
|
def self.os_release_to_setfile(os, release, use_fqdn: false, pidfile_workaround: false)
|
23
26
|
return unless os_supported?(os)
|
24
27
|
|
@@ -26,12 +29,20 @@ module PuppetMetadata
|
|
26
29
|
|
27
30
|
options = {}
|
28
31
|
options[:hostname] = "#{name}.example.com" if use_fqdn
|
32
|
+
|
29
33
|
# Docker messes up cgroups and modern systemd can't deal with that when
|
30
34
|
# PIDFile is used.
|
31
|
-
if pidfile_workaround
|
35
|
+
if pidfile_workaround && (!pidfile_workaround.is_a?(Array) || pidfile_workaround.include?(os))
|
32
36
|
case os
|
33
37
|
when 'CentOS'
|
34
|
-
|
38
|
+
case release
|
39
|
+
when '7'
|
40
|
+
options[:image] = 'centos:7.6.1810'
|
41
|
+
when '8'
|
42
|
+
# There is no CentOS 8 image that works with PIDFile in systemd
|
43
|
+
# unit files
|
44
|
+
return
|
45
|
+
end
|
35
46
|
when 'Ubuntu'
|
36
47
|
options[:image] = 'ubuntu:xenial-20191212' if release == '16.04'
|
37
48
|
end
|
@@ -39,7 +50,10 @@ module PuppetMetadata
|
|
39
50
|
|
40
51
|
setfile = name
|
41
52
|
setfile += "{#{options.map { |key, value| "#{key}=#{value}" }.join(',')}}" if options.any?
|
42
|
-
|
53
|
+
|
54
|
+
human_name = "#{os} #{release}"
|
55
|
+
|
56
|
+
[setfile, human_name]
|
43
57
|
end
|
44
58
|
|
45
59
|
# Return whether a Beaker setfile can be generated for the given OS
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet_metadata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: metadata-json-lint
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.1.
|
146
|
+
rubygems_version: 3.1.4
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Data structures for the Puppet Metadata
|