From 7f8d0f89d6e2a93fdff509b4cc443be5819e3dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 28 Jun 2018 12:24:34 +0200 Subject: Remove cleanup files --- environments/global/roles/cryptoportfolio.yaml | 1 - modules/base_installation/manifests/cleanup.pp | 16 ---------------- modules/role/manifests/cryptoportfolio.pp | 1 - modules/role/manifests/cryptoportfolio/front.pp | 7 ------- modules/role/manifests/cryptoportfolio/postgresql.pp | 19 +------------------ 5 files changed, 1 insertion(+), 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" role::cryptoportfolio::webhook_url: "%{ldapvar.self.vars.cf_slack_webhook.0}" role::cryptoportfolio::pg_db: "cryptoportfolio" role::cryptoportfolio::pg_user: "cryptoportfolio" -role::cryptoportfolio::pg_user_replication: "cryptoportfolio_replication" role::cryptoportfolio::web_host: "%{lookup('base_installation::system_hostname')}" role::cryptoportfolio::web_port: "" role::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 @@ class base_installation::cleanup inherits base_installation { # This class contains temporary classes used to cleanup old stuff # after refactoring - - cron { "puppet-pull-apply": - ensure => absent; - "puppet-apply": - ensure => absent; - "puppet-apply-reboot": - ensure => absent; - "pacman_keys": - ensure => absent; - "backup": - ensure => absent; - "py-cryptoportfolio-before": - ensure => absent; - "py-cryptoportfolio-after": - ensure => absent; - } } 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 ( Optional[String] $env = "prod", Optional[String] $webhook_url = undef, String $pg_user, - String $pg_user_replication, String $pg_db, Optional[String] $pg_hostname = "/run/postgresql", 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 { require => User["$user:"], } - # Cleanup of old directories - file { "${home}/go/src/immae.eu": - ensure => "absent", - force => true, - backup => false, - } - file { "${home}/front": ensure => "link", 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 { password => postgresql_password($pg_user, $pg_password), } - postgresql::server::pg_hba_rule { 'allow localhost TCP access to cryptoportfolio user': + postgresql::server::pg_hba_rule { 'allow local access to cryptoportfolio user': type => 'local', database => $pg_db, user => $pg_user, @@ -21,21 +21,4 @@ class role::cryptoportfolio::postgresql inherits role::cryptoportfolio { order => "05-01", } - # cleanup - postgresql_psql { "DROP PUBLICATION ${pg_db}_publication": - db => $pg_db, - onlyif => "SELECT 1 FROM pg_catalog.pg_publication WHERE pubname = '${pg_db}_publication'", - } -> - postgresql_replication_slot { $pg_user_replication: - ensure => absent - } -> - postgresql_psql { "DROP OWNED BY $pg_user_replication": - db => $pg_db, - onlyif => "SELECT 1 FROM pg_user WHERE usename='$pg_user_replication'" - } -> - postgresql::server::role { $pg_user_replication: - ensure => absent, - } - # /cleanup - } -- cgit v1.2.3