summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-03-19 18:20:33 -0400
committerMicah Anderson <micah@riseup.net>2013-03-19 18:20:33 -0400
commit92ea0355de872a502d552d89ed88729b9b4fbaa2 (patch)
treefd25da102373c0d92d4ae962107c06422141651f /puppet/modules/site_webapp
parente69e40e55abcd3d86e1a12ce214bb64851961e13 (diff)
add webapp secret token that pulls from hiera a 'secret'
Diffstat (limited to 'puppet/modules/site_webapp')
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp6
1 files changed, 6 insertions, 0 deletions
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index ec70a68d..1e6abe42 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -6,6 +6,7 @@ class site_webapp {
$node_domain = hiera('domain')
$provider_domain = $node_domain['full_suffix']
$webapp = hiera('webapp')
+ $secret_token = $webapp['secret_token']
Class[Ruby] -> Class[rubygems] -> Class[bundler::install]
@@ -111,6 +112,11 @@ class site_webapp {
owner => leap-webapp,
group => leap-webapp,
mode => '0600';
+
+ '/srv/leap-webapp/config/initializers/secret_token.rb':
+ content => "LeapWeb::Application.config.secret_token = '${secret_token}'\n",
+ owner => leap-webapp, group => leap-webapp, mode => '0644',
+ notify => Service['apache'];
}
include site_shorewall::webapp