From c9091c5dbdceb83c8cba2e375691c7cfb622d1ed Mon Sep 17 00:00:00 2001 From: John Warren Date: Tue, 1 Dec 2015 10:49:23 -0500 Subject: [PATCH] Copy content to vhost document root The directory /var/lib/graphite/webapp/content is not created in the manifest, requiring it to be copied manually from /opt/graphite-web/webapp/content when setting up a new graphite node. Change-Id: I385e22b9b4d4ddc0afa48b1e4e2693f8e5e97fe1 --- manifests/init.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index a6abd2b..8156f27 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -112,6 +112,19 @@ class graphite( ensure => directory, } + file { '/var/lib/graphite/webapp': + ensure => directory, + require => [File['/var/lib/graphite']], + } + + file { '/var/lib/graphite/webapp/content': + ensure => directory, + source => '/opt/graphite-web/webapp/content', + recurse => true, + require => [File['/var/lib/graphite/webapp'], + Vcsrepo['/opt/graphite-web']], + } + file { '/var/lib/graphite/storage': ensure => directory, owner => 'www-data',