Skip to content

Commit 6971ed7

Browse files
authored
Merge pull request #379 from jonathannewman/maint/main/update-to-postgres-14
Change default postgres version to 14
2 parents 32fcc41 + 61a6abb commit 6971ed7

File tree

7 files changed

+6
-25
lines changed

7 files changed

+6
-25
lines changed

.fixtures.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ fixtures:
1414
augeas_core: 'https://github.com/puppetlabs/puppetlabs-augeas_core.git'
1515
postgresql: 'https://github.com/puppetlabs/puppetlabs-postgresql.git'
1616
firewall: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
17-
postgresql:
18-
repo: 'https://github.com/puppetlabs/puppetlabs-postgresql.git'
19-
ref: 'v9.2.0'
17+
postgresql: 'https://github.com/puppetlabs/puppetlabs-postgresql.git'
2018
firewall: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
2119
symlinks:
2220
puppetdb: '#{source_dir}'

manifests/params.pp

+1-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@
2424
$manage_pg_repo = false
2525
}
2626

27-
if $puppetdb_version in ['latest','present'] or versioncmp($puppetdb_version, '7.0.0') >= 0 {
28-
$postgres_version = '11'
29-
} else {
30-
$postgres_version = '9.6'
31-
}
27+
$postgres_version = '14'
3228

3329
$puppetdb_major_version = $puppetdb_version ? {
3430
'latest' => '8',

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"name": "puppetlabs/postgresql",
17-
"version_requirement": ">= 6.5.0 < 10.0.0"
17+
"version_requirement": ">= 6.5.0 < 11.0.0"
1818
},
1919
{
2020
"name": "puppetlabs/firewall",

spec/acceptance/standalone_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
let(:puppetdb_params) {}
77
let(:puppetdb_master_config_params) {}
88

9-
# TODO: temporary work-around for EL installs
10-
let(:postgres_version) { "(getvar('facts.os.family') == 'RedHat') ? { true => '12', default => undef }" }
9+
let(:postgres_version) { 'undef' } # default
1110
let(:manage_firewall) { "(getvar('facts.os.family') == 'RedHat' and Integer(getvar('facts.os.release.major')) > 7)" }
1211

1312
describe 'with defaults' do

spec/support/acceptance/shared/puppetdb.rb

-12
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@
33
shared_examples 'puppetdb' do
44
let(:pp) do
55
<<~PP
6-
# FIXME: temporary work-around for EL installs
76
if $facts['os']['family'] == 'RedHat' {
8-
$gpg_key_file = $facts['os']['release']['major'] ? {
9-
'7' => 'PGDG-RPM-GPG-KEY-RHEL7',
10-
default => 'PGDG-RPM-GPG-KEY-RHEL',
11-
}
12-
file { "/etc/pki/rpm-gpg/${gpg_key_file}":
13-
source => "https://download.postgresql.org/pub/repos/yum/keys/${gpg_key_file}",
14-
}
15-
-> Yumrepo <| tag == 'postgresql::repo' |> {
16-
gpgkey => "file:///etc/pki/rpm-gpg/${gpg_key_file}",
17-
}
18-
197
# Work-around EL systemd in docker bug affecting forked services
208
file_line { 'puppetdb-unit-remove-pidfile':
219
path => '/lib/systemd/system/puppetdb.service',

spec/support/unit/shared/database.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
end
221221

222222
shared_examples 'puppetdb::database::postgresql_ssl_rules' do |error|
223-
let(:defaults) { {} }
223+
let(:defaults) { { postgres_version: '14' } }
224224
let(:with) { defined?(args) ? defaults.merge(args) : defaults }
225225

226226
if error

spec/unit/classes/database/postgresql_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
{
9595
read_database_username: params[:read_database_username],
9696
database_name: params[:database_name],
97-
password_hash: 'md588e898a4bade3fe1c9b96f650ec85900', # TODO: mock properly
97+
password_hash: %r{^(md5|SCRAM)}, # TODO: mock properly
9898
database_owner: params[:database_username],
9999
}
100100
end

0 commit comments

Comments
 (0)