From 9f4b21c86b95afeee38f4578d1032524b25d5b24 Mon Sep 17 00:00:00 2001 From: toepi Date: Sat, 1 Oct 2016 20:38:05 +0200 Subject: [PATCH] notify service after installation/migration better upgrade experience with puppet tested with: 6.9.x -> 7.12.x and 7.12.x -> 7.14.x Refs #47 --- manifests/install.pp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index cd8d9ec..9cff743 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -101,7 +101,10 @@ File["${git_home}/gitlab/config/gitlab.yml"], Gitlab::Config::Resque['gitlab'], ], - notify => Exec['run migrations'], + notify => [ + Exec['run migrations'], + Exec['cleanup'], + ] } exec { 'setup gitlab database': @@ -124,9 +127,19 @@ exec { 'run migrations': command => 'bundle exec rake db:migrate RAILS_ENV=production', - cwd => "${git_home}/gitlab", - refreshonly => true, - notify => Exec['precompile assets'], + cwd => "${git_home}/gitlab", + refreshonly => true, + notify => [ + Exec['precompile assets'], + Class['::gitlab::service'], + ], + } + + exec { 'cleanup': + command => 'bundle clean', + cwd => "${git_home}/gitlab", + refreshonly => true, + notify => Class['::gitlab::service'], } file {