From: Ismaƫl Bouya Date: Wed, 21 Feb 2018 13:44:41 +0000 (+0100) Subject: Dump cryptoportfolio schema X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=43c4ee4e2fd1c7ed992a420d6d478375475194dd;hp=f099c453f79d1df1b77dd8508345568feef35178;p=perso%2FImmae%2FProjets%2FPuppet.git Dump cryptoportfolio schema --- diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp index a1cfde3..9a2bfd2 100644 --- a/modules/role/manifests/cryptoportfolio.pp +++ b/modules/role/manifests/cryptoportfolio.pp @@ -206,7 +206,7 @@ class role::cryptoportfolio { target => $cf_front_app, before => File[$cf_front_app], } ~> - exec { "remove old directory": + exec { "remove old ${cf_front_app} directory": refreshonly => true, user => $cf_user, command => "/usr/bin/rm -rf ${cf_front_app}", @@ -257,6 +257,12 @@ class role::cryptoportfolio { File["/etc/systemd/system/cryptoportfolio-app.service"], Postgresql::Server::Db[$cf_pg_db] ], + } ~> + exec { "dump $cf_pg_db structure": + refreshonly => true, + user => $::profile::postgresql::pg_user, + group => $::profile::postgresql::pg_user, + command => "/usr/bin/pg_dump --schema-only --clean --no-publications $cf_pg_db > /var/lib/postgres/${cf_pg_db}.schema", } file { $cf_front_app_api_conf: