]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Remove cleanup files
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 28 Jun 2018 10:24:34 +0000 (12:24 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 28 Jun 2018 10:25:38 +0000 (12:25 +0200)
environments/global/roles/cryptoportfolio.yaml
modules/base_installation/manifests/cleanup.pp
modules/role/manifests/cryptoportfolio.pp
modules/role/manifests/cryptoportfolio/front.pp
modules/role/manifests/cryptoportfolio/postgresql.pp

index f875c1b8a0a1f736e8a5fd01ba9a79521ba7412e..138da7a29b6f12bd5bacc65fef6fe4032158fced 100644 (file)
@@ -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
index 96aaa6b0a253a39bf07a6298e4f6a98e3e3b9ca5..61a9c8c5b2bce32d6bb344d7e18fa8df5a6723ca 100644 (file)
@@ -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;
-  }
 }
index 59dacd0254e1e6c4a4e067d0b5ac52d1e42546f1..c675e91421b7c22f5d5af5d3f14e7b969a542800 100644 (file)
@@ -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",
index 0aa419fe47d64f246780e7c7f73e0a3fefe0a3bc..cf73a27054eff9939efdd3c84d32f8890c4d5832 100644 (file)
@@ -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,
index addad6724ac444333b23c65ba5e788c3e2a276ba..eda0d020625add4ab04c25e72513680a0f64f7e6 100644 (file)
@@ -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
-
 }