Skip to content

Commit e7cba51

Browse files
initdb exec needs unique title for instances
1 parent 25e4422 commit e7cba51

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

manifests/server/instance/initdb.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172

173173
# This runs the initdb command, we use the existance of the PG_VERSION
174174
# file to ensure we don't keep running this command.
175-
exec { 'postgresql_initdb':
175+
exec { "postgresql_initdb_instance_${name}":
176176
command => $initdb_command,
177177
creates => "${datadir}/PG_VERSION",
178178
user => $user,

spec/classes/server/initdb_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class { 'postgresql::server': }
6565
end
6666

6767
it 'contains exec with specified working directory' do
68-
expect(subject).to contain_exec('postgresql_initdb').with(
68+
expect(subject).to contain_exec('postgresql_initdb_instance_main').with(
6969
cwd: '/var/tmp',
7070
)
7171
end
@@ -82,7 +82,7 @@ class { 'postgresql::server': }
8282
end
8383

8484
it 'contains exec with default working directory' do
85-
expect(subject).to contain_exec('postgresql_initdb').with(
85+
expect(subject).to contain_exec('postgresql_initdb_instance_main').with(
8686
cwd: '/tmp',
8787
)
8888
end

spec/classes/server_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class { 'postgresql::globals':
194194
end
195195

196196
it 'contains proper initdb exec' do
197-
expect(subject).to contain_exec('postgresql_initdb')
197+
expect(subject).to contain_exec('postgresql_initdb_instance_main')
198198
end
199199
end
200200

0 commit comments

Comments
 (0)