summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-05-22 12:56:43 -0400
committerMicah Anderson <micah@riseup.net>2013-05-22 12:56:43 -0400
commite0b591b063d3c49012a4266ee837737758f58dc2 (patch)
tree346e19d8f5486c5d637839be6d55dc54e73f5a90 /puppet/modules/site_webapp
parent92b90bc4507f412497c3128f0817bd24e2628b1b (diff)
add requirements to the try::file resources
normally a file resource would automatically require the parent directory first, but try::file doesn't do this so it has errors if /srv/leap/webapp doesn't exist yet: for example: - [web1] err: /Stage[main]/Site_webapp/Try::File[/srv/leap/webapp/public/img]/Exec[restore_/srv/leap/webapp/public/img]/returns: change from notrun to 0 failed: Working directory '/srv/leap/webapp/public' does not exist that was 'tried' before the vcsrepo was done which would have resolved that problem. This makes sure that the vcsrepo is done first
Diffstat (limited to 'puppet/modules/site_webapp')
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp8
1 files changed, 6 insertions, 2 deletions
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index aac48188..b01141ae 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -106,19 +106,23 @@ class site_webapp {
try::file {
'/srv/leap/webapp/public/favicon.ico':
- ensure => 'link',
- target => $webapp['favicon'];
+ ensure => 'link',
+ require => Vcsrepo['/srv/leap/webapp'],
+ target => $webapp['favicon'];
'/srv/leap/webapp/app/assets/stylesheets/tail.scss':
ensure => 'link',
+ require => Vcsrepo['/srv/leap/webapp'],
target => $webapp['tail_scss'];
'/srv/leap/webapp/app/assets/stylesheets/head.scss':
ensure => 'link',
+ require => Vcsrepo['/srv/leap/webapp'],
target => $webapp['head_scss'];
'/srv/leap/webapp/public/img':
ensure => 'link',
+ require => Vcsrepo['/srv/leap/webapp'],
target => $webapp['img_dir'];
}