From d332ad4895ca8da370cd42f08779c00d9c58cee8 Mon Sep 17 00:00:00 2001 From: Paul Van Eck Date: Mon, 20 Jul 2015 11:32:30 -0700 Subject: [PATCH] Add config.json file generation The Refstack UI JS expects a config.json file to tell it the base URL of the API. Without this file, API calls cannot be made, so puppet should generate this file. Change-Id: I6ae9d18c22771561d18691faabe53ee575b9486b --- manifests/app.pp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/manifests/app.pp b/manifests/app.pp index 413d655..ce2befe 100644 --- a/manifests/app.pp +++ b/manifests/app.pp @@ -85,4 +85,11 @@ class refstack::app () { 'HOME=/home/refstack' ] } + + # Create config.json file + file { "${src_www_root}/refstack-ui/app/config.json": + ensure => file, + content => '{"refstackApiUrl": "/api/v1"}', + require => Vcsrepo[$src_www_root], + } }