aboutsummaryrefslogtreecommitdiff
path: root/modules/role/manifests/cryptoportfolio/postgresql.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/role/manifests/cryptoportfolio/postgresql.pp')
-rw-r--r--modules/role/manifests/cryptoportfolio/postgresql.pp19
1 files changed, 1 insertions, 18 deletions
diff --git a/modules/role/manifests/cryptoportfolio/postgresql.pp b/modules/role/manifests/cryptoportfolio/postgresql.pp
index addad67..eda0d02 100644
--- a/modules/role/manifests/cryptoportfolio/postgresql.pp
+++ b/modules/role/manifests/cryptoportfolio/postgresql.pp
@@ -13,7 +13,7 @@ class role::cryptoportfolio::postgresql inherits role::cryptoportfolio {
13 password => postgresql_password($pg_user, $pg_password), 13 password => postgresql_password($pg_user, $pg_password),
14 } 14 }
15 15
16 postgresql::server::pg_hba_rule { 'allow localhost TCP access to cryptoportfolio user': 16 postgresql::server::pg_hba_rule { 'allow local access to cryptoportfolio user':
17 type => 'local', 17 type => 'local',
18 database => $pg_db, 18 database => $pg_db,
19 user => $pg_user, 19 user => $pg_user,
@@ -21,21 +21,4 @@ class role::cryptoportfolio::postgresql inherits role::cryptoportfolio {
21 order => "05-01", 21 order => "05-01",
22 } 22 }
23 23
24 # cleanup
25 postgresql_psql { "DROP PUBLICATION ${pg_db}_publication":
26 db => $pg_db,
27 onlyif => "SELECT 1 FROM pg_catalog.pg_publication WHERE pubname = '${pg_db}_publication'",
28 } ->
29 postgresql_replication_slot { $pg_user_replication:
30 ensure => absent
31 } ->
32 postgresql_psql { "DROP OWNED BY $pg_user_replication":
33 db => $pg_db,
34 onlyif => "SELECT 1 FROM pg_user WHERE usename='$pg_user_replication'"
35 } ->
36 postgresql::server::role { $pg_user_replication:
37 ensure => absent,
38 }
39 # /cleanup
40
41} 24}