Skip to content

Commit 076cc7f

Browse files
committed
The add_compiler plan also requires PSQL version
The add_compiler plan makes changes to PSQL for communication with PuppetDB.
1 parent 311b560 commit 076cc7f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plans/add_compiler.pp

+6-3
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,25 @@
4444
}
4545
}
4646

47+
# On the PostgreSQL server backing PuppetDB for compiler, get version number
48+
$psql_version = run_task('peadm::get_psql_version', $primary_postgresql_target).first.value['version']
49+
4750
# Add the following two lines to /opt/puppetlabs/server/data/postgresql/11/data/pg_ident.conf
4851
#
4952
# pe-puppetdb-pe-puppetdb-map <new-compiler-host> pe-puppetdb
5053
# pe-puppetdb-pe-puppetdb-migrator-map <new-compiler-host> pe-puppetdb-migrator
5154

5255
apply($primary_postgresql_target) {
5356
file_line { 'pe-puppetdb-pe-puppetdb-map':
54-
path => '/opt/puppetlabs/server/data/postgresql/11/data/pg_ident.conf',
57+
path => "/opt/puppetlabs/server/data/postgresql/${psql_version}/data/pg_ident.conf",
5558
line => "pe-puppetdb-pe-puppetdb-map ${compiler_target.peadm::certname()} pe-puppetdb",
5659
}
5760
file_line { 'pe-puppetdb-pe-puppetdb-migrator-map':
58-
path => '/opt/puppetlabs/server/data/postgresql/11/data/pg_ident.conf',
61+
path => "/opt/puppetlabs/server/data/postgresql/${psql_version}/data/pg_ident.conf",
5962
line => "pe-puppetdb-pe-puppetdb-migrator-map ${compiler_target.peadm::certname()} pe-puppetdb-migrator",
6063
}
6164
file_line { 'pe-puppetdb-pe-puppetdb-read-map':
62-
path => '/opt/puppetlabs/server/data/postgresql/11/data/pg_ident.conf',
65+
path => "/opt/puppetlabs/server/data/postgresql/${psql_version}/data/pg_ident.conf",
6366
line => "pe-puppetdb-pe-puppetdb-read-map ${compiler_target.peadm::certname()} pe-puppetdb-read",
6467
}
6568
}

0 commit comments

Comments
 (0)