Commit 4fff03330994848130300901cb3bbd272216881a

Authored by Antonio Terceiro
1 parent 96839740

colab: split database configuration into its own file

like the RPM package does
cookbooks/colab/recipes/default.rb
@@ -27,6 +27,13 @@ template '/etc/colab/settings.yaml' do @@ -27,6 +27,13 @@ template '/etc/colab/settings.yaml' do
27 notifies :restart, 'service[colab]' 27 notifies :restart, 'service[colab]'
28 end 28 end
29 29
  30 +template '/etc/colab/settings.d/00-database.yaml' do
  31 + owner 'root'
  32 + group 'colab'
  33 + mode 0640
  34 + notifies :restart, 'service[colab]'
  35 +end
  36 +
30 cookbook_file '/usr/lib/colab/lib/python2.7/site-packages/colab/static/img/logo.svg' do 37 cookbook_file '/usr/lib/colab/lib/python2.7/site-packages/colab/static/img/logo.svg' do
31 owner 'root' 38 owner 'root'
32 group 'root' 39 group 'root'
cookbooks/colab/templates/00-database.yaml.erb 0 → 100644
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +DATABASES:
  2 + default:
  3 + ENGINE: django.db.backends.postgresql_psycopg2
  4 + NAME: colab
  5 + USER: colab
  6 + HOST: <%= node['peers']['database'] %>
cookbooks/colab/templates/settings.yaml.erb
1 -DATABASES:  
2 - default:  
3 - ENGINE: django.db.backends.postgresql_psycopg2  
4 - NAME: colab  
5 - USER: colab  
6 - HOST: <%= node['peers']['database'] %>  
7 1
8 ## Set to false in production 2 ## Set to false in production
9 DEBUG: false 3 DEBUG: false