Skip to content

Commit 8081c8a

Browse files
committed
(PA-5721) Add support for puppet8
AIX 7.1 is not supported in puppet8 and will be removed from puppet7 in the near future.
1 parent b0d2017 commit 8081c8a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

manifests/osfamily/aix.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@
2424
# * AIX version 7.1 < aix-7.1-power package
2525
# * AIX version 7.2 < aix-7.1-power package
2626
#
27+
# puppet 8:
28+
# * AIX version 7.2 < aix-7.2-power package
29+
#
2730
# All other versions will now _only_ use the aix-7.1-power packages (i.e. we now only ship
2831
# one package to support all aix versions).
2932
#
3033
# The following will update the aix_ver_number variable to identify which package to install based
3134
# on puppet collection, package version and AIX version.
3235
$_aix_ver_number = regsubst($::platform_tag,'aix-(\d+\.\d+)-power','\1')
3336
if $_aix_ver_number {
34-
if $::puppet_agent::collection =~ /^puppet7/ {
37+
if $::puppet_agent::collection =~ /^puppet8/ {
38+
$aix_ver_number = '7.2'
39+
} elsif $::puppet_agent::collection =~ /^puppet7/ {
3540
$aix_ver_number = '7.1'
3641
} else {
3742
# 6.19.1 is the last puppet6 release that ships AIX 6.1 packages

spec/classes/puppet_agent_osfamily_aix_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,23 @@
129129
end
130130
end
131131

132+
context 'with a puppet8 collection' do
133+
context 'with versions greater than or equal to 8.0.0' do
134+
let(:params) do
135+
{
136+
package_version: '8.0.0',
137+
collection: 'puppet8',
138+
}
139+
end
140+
141+
[['7.2', '7.2', '7']].each do |aixver, pkg_aixver, powerver|
142+
context "aix #{aixver}" do
143+
include_examples 'aix', aixver, pkg_aixver, powerver
144+
end
145+
end
146+
end
147+
end
148+
132149
context 'with package_version auto' do
133150
let(:params) do
134151
{

0 commit comments

Comments
 (0)