From 1a2789d084c3c2beccb97726b8799cb194a634fd Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 9 Feb 2013 20:17:48 +0100 Subject: run bundler and rake assets:precompile as normal user otherwise the generated files will be owned by root and the bundle will be inside roots /home/max --- puppet/modules/site_webapp/manifests/init.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'puppet') diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index f0d6c90a..46cc0ed6 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -52,8 +52,9 @@ class site_webapp { exec { 'bundler_update': cwd => '/srv/leap-webapp', - command => '/bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install"', + command => '/bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install --path vendor/bundle"', unless => '/usr/bin/bundle check', + user => 'leap-webapp', timeout => 600, require => [ Class['bundler::install'], Vcsrepo['/srv/leap-webapp'] ], notify => Service['apache']; @@ -62,6 +63,7 @@ class site_webapp { exec { 'compile_assets': cwd => '/srv/leap-webapp', command => '/bin/bash -c "/usr/bin/bundle exec rake assets:precompile"', + user => 'leap-webapp', require => Exec['bundler_update'], notify => Service['apache']; } -- cgit v1.2.3