From 886063ca1db3a4ce8fbd72e4ead9b5f2371979a5 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 11 Jan 2013 17:12:49 -0800 Subject: configure webapp with correct domain --- puppet/modules/site_webapp/manifests/init.pp | 10 ++++++++++ puppet/modules/site_webapp/templates/config.yml.erb | 3 +++ puppet/modules/site_webapp/templates/couchdb.yml.erb | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 puppet/modules/site_webapp/templates/config.yml.erb diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index ebe58c95..22695966 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -3,6 +3,8 @@ class site_webapp { $definition_files = hiera('definition_files') $provider = $definition_files['provider'] $eip_service = $definition_files['eip_service'] + $node_domain = hiera('domain') + $provider_domain = $node_domain['full_suffix'] Class[Ruby] -> Class[rubygems] -> Class[bundler::install] @@ -70,4 +72,12 @@ class site_webapp { owner => leap-webapp, group => leap-webapp, mode => '0644'; } + file { + '/srv/leap-webapp/config/config.yml': + content => template('site_webapp/config.yml.erb'), + owner => leap-webapp, + group => leap-webapp, + mode => '0600'; + } + } diff --git a/puppet/modules/site_webapp/templates/config.yml.erb b/puppet/modules/site_webapp/templates/config.yml.erb new file mode 100644 index 00000000..5e223a58 --- /dev/null +++ b/puppet/modules/site_webapp/templates/config.yml.erb @@ -0,0 +1,3 @@ +production: + admins: [admin] + domain: <%= @provider_domain %> diff --git a/puppet/modules/site_webapp/templates/couchdb.yml.erb b/puppet/modules/site_webapp/templates/couchdb.yml.erb index e5678680..ee521713 100644 --- a/puppet/modules/site_webapp/templates/couchdb.yml.erb +++ b/puppet/modules/site_webapp/templates/couchdb.yml.erb @@ -1,8 +1,8 @@ production: prefix: "" protocol: 'https' - host: <%= couchdb_host %> + host: <%= @couchdb_host %> port: 6984 - username: <%= couchdb_user %> - password: <%= couchdb_password %> + username: <%= @couchdb_user %> + password: <%= @couchdb_password %> -- cgit v1.2.3