aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-21 14:31:42 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-21 15:32:21 +0100
commitf099c453f79d1df1b77dd8508345568feef35178 (patch)
treec7947c1690b1d56dd4fd6f72fc114918cc23efe3 /modules
parentb3015828f95acd3f239ab7a614418918f21fb8d1 (diff)
downloadPuppet-f099c453f79d1df1b77dd8508345568feef35178.tar.gz
Puppet-f099c453f79d1df1b77dd8508345568feef35178.tar.zst
Puppet-f099c453f79d1df1b77dd8508345568feef35178.zip
Handle version changes
Diffstat (limited to 'modules')
-rw-r--r--modules/role/manifests/cryptoportfolio.pp15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp
index e14d43d..a1cfde3 100644
--- a/modules/role/manifests/cryptoportfolio.pp
+++ b/modules/role/manifests/cryptoportfolio.pp
@@ -204,7 +204,13 @@ class role::cryptoportfolio {
204 file { "${cf_home}/front": 204 file { "${cf_home}/front":
205 ensure => "link", 205 ensure => "link",
206 target => $cf_front_app, 206 target => $cf_front_app,
207 require => Archive["/opt/cryptoportfolio/${front_version}.tar.gz"] 207 before => File[$cf_front_app],
208 } ~>
209 exec { "remove old directory":
210 refreshonly => true,
211 user => $cf_user,
212 command => "/usr/bin/rm -rf ${cf_front_app}",
213 before => File[$cf_front_app],
208 } 214 }
209 215
210 exec { "go-get-dep": 216 exec { "go-get-dep":
@@ -244,9 +250,10 @@ class role::cryptoportfolio {
244 } 250 }
245 251
246 service { 'cryptoportfolio-app': 252 service { 'cryptoportfolio-app':
247 enable => true, 253 enable => true,
248 ensure => "running", 254 ensure => "running",
249 require => [ 255 subscribe => [Exec["go-cryptoportfolio-app"], Exec["web-cryptoportfolio-build"]],
256 require => [
250 File["/etc/systemd/system/cryptoportfolio-app.service"], 257 File["/etc/systemd/system/cryptoportfolio-app.service"],
251 Postgresql::Server::Db[$cf_pg_db] 258 Postgresql::Server::Db[$cf_pg_db]
252 ], 259 ],