aboutsummaryrefslogtreecommitdiff
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
parent0a145a25c0a8cbcd50d515d2a828bd6665836ddb (diff)
downloadPuppet-7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3.tar.gz
Puppet-7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3.tar.zst
Puppet-7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3.zip
Remove cleanup files
-rw-r--r--environments/global/roles/cryptoportfolio.yaml1
-rw-r--r--modules/base_installation/manifests/cleanup.pp16
-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
5 files changed, 1 insertions, 43 deletions
diff --git a/environments/global/roles/cryptoportfolio.yaml b/environments/global/roles/cryptoportfolio.yaml
index f875c1b..138da7a 100644
--- a/environments/global/roles/cryptoportfolio.yaml
+++ b/environments/global/roles/cryptoportfolio.yaml
@@ -9,7 +9,6 @@ role::cryptoportfolio::env: "prod"
9role::cryptoportfolio::webhook_url: "%{ldapvar.self.vars.cf_slack_webhook.0}" 9role::cryptoportfolio::webhook_url: "%{ldapvar.self.vars.cf_slack_webhook.0}"
10role::cryptoportfolio::pg_db: "cryptoportfolio" 10role::cryptoportfolio::pg_db: "cryptoportfolio"
11role::cryptoportfolio::pg_user: "cryptoportfolio" 11role::cryptoportfolio::pg_user: "cryptoportfolio"
12role::cryptoportfolio::pg_user_replication: "cryptoportfolio_replication"
13role::cryptoportfolio::web_host: "%{lookup('base_installation::system_hostname')}" 12role::cryptoportfolio::web_host: "%{lookup('base_installation::system_hostname')}"
14role::cryptoportfolio::web_port: "" 13role::cryptoportfolio::web_port: ""
15role::cryptoportfolio::web_ssl: true 14role::cryptoportfolio::web_ssl: true
diff --git a/modules/base_installation/manifests/cleanup.pp b/modules/base_installation/manifests/cleanup.pp
index 96aaa6b..61a9c8c 100644
--- a/modules/base_installation/manifests/cleanup.pp
+++ b/modules/base_installation/manifests/cleanup.pp
@@ -1,20 +1,4 @@
1class base_installation::cleanup inherits base_installation { 1class base_installation::cleanup inherits base_installation {
2 # This class contains temporary classes used to cleanup old stuff 2 # This class contains temporary classes used to cleanup old stuff
3 # after refactoring 3 # after refactoring
4
5 cron { "puppet-pull-apply":
6 ensure => absent;
7 "puppet-apply":
8 ensure => absent;
9 "puppet-apply-reboot":
10 ensure => absent;
11 "pacman_keys":
12 ensure => absent;
13 "backup":
14 ensure => absent;
15 "py-cryptoportfolio-before":
16 ensure => absent;
17 "py-cryptoportfolio-after":
18 ensure => absent;
19 }
20} 4}
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}