aboutsummaryrefslogtreecommitdiff
path: root/modules/role
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-06-28 12:24:34 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-06-28 12:25:38 +0200
commit7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3 (patch)
tree490499d1195e618d8d039659250ecc6595006c2e /modules/role
parent0a145a25c0a8cbcd50d515d2a828bd6665836ddb (diff)
downloadPuppet-7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3.tar.gz
Puppet-7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3.tar.zst
Puppet-7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3.zip
Remove cleanup files
Diffstat (limited to 'modules/role')
-rw-r--r--modules/role/manifests/cryptoportfolio.pp1
-rw-r--r--modules/role/manifests/cryptoportfolio/front.pp7
-rw-r--r--modules/role/manifests/cryptoportfolio/postgresql.pp19
3 files changed, 1 insertions, 26 deletions
diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp
index 59dacd0..c675e91 100644
--- a/modules/role/manifests/cryptoportfolio.pp
+++ b/modules/role/manifests/cryptoportfolio.pp
@@ -5,7 +5,6 @@ class role::cryptoportfolio (
5 Optional[String] $env = "prod", 5 Optional[String] $env = "prod",
6 Optional[String] $webhook_url = undef, 6 Optional[String] $webhook_url = undef,
7 String $pg_user, 7 String $pg_user,
8 String $pg_user_replication,
9 String $pg_db, 8 String $pg_db,
10 Optional[String] $pg_hostname = "/run/postgresql", 9 Optional[String] $pg_hostname = "/run/postgresql",
11 Optional[String] $pg_port = "5432", 10 Optional[String] $pg_port = "5432",
diff --git a/modules/role/manifests/cryptoportfolio/front.pp b/modules/role/manifests/cryptoportfolio/front.pp
index 0aa419f..cf73a27 100644
--- a/modules/role/manifests/cryptoportfolio/front.pp
+++ b/modules/role/manifests/cryptoportfolio/front.pp
@@ -33,13 +33,6 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio {
33 require => User["$user:"], 33 require => User["$user:"],
34 } 34 }
35 35
36 # Cleanup of old directories
37 file { "${home}/go/src/immae.eu":
38 ensure => "absent",
39 force => true,
40 backup => false,
41 }
42
43 file { "${home}/front": 36 file { "${home}/front":
44 ensure => "link", 37 ensure => "link",
45 target => $cf_front_app, 38 target => $cf_front_app,
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}