cem_acpt 0.12.3 → 0.12.4
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0670fc107d34a475c456d55ee179f24488d862e24ca3eb58b1645bf994ebc216
|
|
4
|
+
data.tar.gz: e39cb29afd796dea81395ab17cc6bf6107202221a0ac1e927e5bdad256db6a61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4718840a0a1802a3b08ee469fd8857e6a6e5bbc4c26cf5902793d6e7e0eb5bae7efe781e8f354ad28edd951605c1270bee07f187e00532cb07ee3131e3f98ab
|
|
7
|
+
data.tar.gz: d9267e9d122d925f4384c638141f25be84a22a036fc60c4ad1319dacb302daafd144e04cc7dacf495f0d607f84ab401f6b4190006184cdcf967034ced6e70b54
|
|
@@ -97,10 +97,22 @@ module CemAcpt
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
class DebianFamily
|
|
100
|
-
|
|
100
|
+
CODENAME_MAP = {
|
|
101
|
+
'ubuntu' => {
|
|
102
|
+
'2004' => 'focal',
|
|
103
|
+
'2204' => 'jammy',
|
|
104
|
+
'2404' => 'noble',
|
|
105
|
+
},
|
|
106
|
+
'debian' => {
|
|
107
|
+
'12' => 'bookworm',
|
|
108
|
+
},
|
|
109
|
+
}.freeze
|
|
110
|
+
|
|
111
|
+
def initialize(config, image_name, base_image, os_major_version, puppet_version, os: 'ubuntu')
|
|
101
112
|
@config = config
|
|
102
113
|
@image_name = image_name
|
|
103
114
|
@base_image = base_image
|
|
115
|
+
@os = os
|
|
104
116
|
@os_major_version = os_major_version
|
|
105
117
|
@puppet_version = puppet_version
|
|
106
118
|
end
|
|
@@ -121,8 +133,16 @@ module CemAcpt
|
|
|
121
133
|
|
|
122
134
|
private
|
|
123
135
|
|
|
136
|
+
def apt_codename
|
|
137
|
+
CODENAME_MAP.dig(@os, @os_major_version) || 'focal'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def noninteractive?
|
|
141
|
+
(@os == 'ubuntu' && @os_major_version.to_i > 2004) || @os == 'debian'
|
|
142
|
+
end
|
|
143
|
+
|
|
124
144
|
def upgrade_packages_command
|
|
125
|
-
if
|
|
145
|
+
if noninteractive?
|
|
126
146
|
'sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=1 NEEDRESTART_MODE=a apt-get update &&'\
|
|
127
147
|
' sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=1 NEEDRESTART_MODE=a apt-get upgrade -y'
|
|
128
148
|
else
|
|
@@ -146,15 +166,15 @@ module CemAcpt
|
|
|
146
166
|
|
|
147
167
|
# Update to the new private Puppet platform repository URL for apt
|
|
148
168
|
def puppet_platform_repository_url
|
|
149
|
-
"https://apt-puppetcore.puppet.com/public/puppet#{@puppet_version}-release
|
|
169
|
+
"https://apt-puppetcore.puppet.com/public/puppet#{@puppet_version}-release-#{apt_codename}.deb"
|
|
150
170
|
end
|
|
151
171
|
|
|
152
172
|
def enable_puppet_repository_command
|
|
153
|
-
"wget --content-disposition #{puppet_platform_repository_url} && sudo dpkg -i puppet#{@puppet_version}-release
|
|
173
|
+
"wget --content-disposition #{puppet_platform_repository_url} && sudo dpkg -i puppet#{@puppet_version}-release-#{apt_codename}.deb"
|
|
154
174
|
end
|
|
155
175
|
|
|
156
176
|
def install_puppet_agent_command
|
|
157
|
-
if
|
|
177
|
+
if noninteractive?
|
|
158
178
|
'sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=1 NEEDRESTART_MODE=a apt-get install -y puppet-agent'
|
|
159
179
|
else
|
|
160
180
|
'sudo apt-get install -y puppet-agent'
|
|
@@ -175,6 +195,7 @@ module CemAcpt
|
|
|
175
195
|
'oel' => 'EnterpriseLinuxFamily',
|
|
176
196
|
'rocky' => 'EnterpriseLinuxFamily',
|
|
177
197
|
'ubuntu' => 'DebianFamily',
|
|
198
|
+
'debian' => 'DebianFamily',
|
|
178
199
|
'windows' => 'WindowsFamily',
|
|
179
200
|
}.freeze
|
|
180
201
|
|
|
@@ -184,7 +205,12 @@ module CemAcpt
|
|
|
184
205
|
cmd_klass = OS_CLASS_MAP[os.to_s]
|
|
185
206
|
raise "Unsupported OS: #{os}" unless cmd_klass
|
|
186
207
|
|
|
187
|
-
const_get(cmd_klass)
|
|
208
|
+
klass = const_get(cmd_klass)
|
|
209
|
+
if klass == DebianFamily
|
|
210
|
+
klass.new(config, image_name, base_image, os_major_version, puppet_version, os: os.to_s).provision_commands
|
|
211
|
+
else
|
|
212
|
+
klass.new(config, image_name, base_image, os_major_version, puppet_version).provision_commands
|
|
213
|
+
end
|
|
188
214
|
end
|
|
189
215
|
end
|
|
190
216
|
end
|
|
@@ -10,11 +10,11 @@ module CemAcpt
|
|
|
10
10
|
GOSS_DOWNLOAD_URL = "https://github.com/goss-org/goss/releases/download/#{GOSS_VERSION}/goss-linux-amd64"
|
|
11
11
|
|
|
12
12
|
def self.valid_names
|
|
13
|
-
%w[centos rhel oel alma rocky ubuntu]
|
|
13
|
+
%w[centos rhel oel alma rocky ubuntu debian]
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.valid_versions
|
|
17
|
-
%w[7 8 9 10 2004 2204 2404]
|
|
17
|
+
%w[7 8 9 10 12 2004 2204 2404]
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def systemd_files
|
|
@@ -91,7 +91,7 @@ module CemAcpt
|
|
|
91
91
|
'sudo dnf upgrade -y dnf',
|
|
92
92
|
]
|
|
93
93
|
(commands << base).flatten
|
|
94
|
-
elsif image_name.include?('ubuntu')
|
|
94
|
+
elsif image_name.include?('ubuntu') || image_name.include?('debian')
|
|
95
95
|
commands = ['sudo apt purge -y unattended-upgrades', 'sudo apt-get update -y']
|
|
96
96
|
(commands << base).flatten
|
|
97
97
|
else
|
data/lib/cem_acpt/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cem_acpt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- puppetlabs
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: async-http
|
|
@@ -358,7 +357,6 @@ metadata:
|
|
|
358
357
|
homepage_uri: https://github.com/puppetlabs/cem_acpt
|
|
359
358
|
source_code_uri: https://github.com/puppetlabs/cem_acpt
|
|
360
359
|
changelog_uri: https://github.com/puppetlabs/cem_acpt
|
|
361
|
-
post_install_message:
|
|
362
360
|
rdoc_options: []
|
|
363
361
|
require_paths:
|
|
364
362
|
- lib
|
|
@@ -373,8 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
373
371
|
- !ruby/object:Gem::Version
|
|
374
372
|
version: '0'
|
|
375
373
|
requirements: []
|
|
376
|
-
rubygems_version: 3.
|
|
377
|
-
signing_key:
|
|
374
|
+
rubygems_version: 3.6.9
|
|
378
375
|
specification_version: 4
|
|
379
376
|
summary: CEM Acceptance Tests
|
|
380
377
|
test_files: []
|