Commit 67f3a5d6a787b101f0c0f2a1c4c6247fc8515e1b
1 parent
40d68fe6
Exists in
master
and in
79 other branches
Redefined colab settings order
Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
Showing
9 changed files
with
58 additions
and
58 deletions
Show diff stats
cookbooks/colab/recipes/default.rb
@@ -38,7 +38,7 @@ execute 'secret-key' do | @@ -38,7 +38,7 @@ execute 'secret-key' do | ||
38 | f = '/etc/colab/secret.key' | 38 | f = '/etc/colab/secret.key' |
39 | command "openssl rand -hex 32 -out #{f} && chown root:colab #{f} && chmod 0640 #{f}" | 39 | command "openssl rand -hex 32 -out #{f} && chown root:colab #{f} && chmod 0640 #{f}" |
40 | not_if { File.exists?(f) } | 40 | not_if { File.exists?(f) } |
41 | - notifies :create, 'template[/etc/colab/settings.d/04-custom_settings.py]' | 41 | + notifies :create, 'template[/etc/colab/settings.d/00-custom_settings.py]' |
42 | end | 42 | end |
43 | 43 | ||
44 | template '/etc/sysconfig/colab' do | 44 | template '/etc/sysconfig/colab' do |
@@ -48,14 +48,14 @@ template '/etc/sysconfig/colab' do | @@ -48,14 +48,14 @@ template '/etc/sysconfig/colab' do | ||
48 | notifies :restart, 'service[colab]' | 48 | notifies :restart, 'service[colab]' |
49 | end | 49 | end |
50 | 50 | ||
51 | -template '/etc/colab/settings.d/00-database.py' do | 51 | +template '/etc/colab/settings.d/00-custom_settings.py' do |
52 | owner 'root' | 52 | owner 'root' |
53 | group 'colab' | 53 | group 'colab' |
54 | mode 0640 | 54 | mode 0640 |
55 | notifies :restart, 'service[colab]' | 55 | notifies :restart, 'service[colab]' |
56 | end | 56 | end |
57 | 57 | ||
58 | -template '/etc/colab/settings.d/04-custom_settings.py' do | 58 | +template '/etc/colab/settings.d/01-database.py' do |
59 | owner 'root' | 59 | owner 'root' |
60 | group 'colab' | 60 | group 'colab' |
61 | mode 0640 | 61 | mode 0640 |
@@ -104,13 +104,13 @@ template '/etc/colab/settings.d/03-sentry.py' do | @@ -104,13 +104,13 @@ template '/etc/colab/settings.d/03-sentry.py' do | ||
104 | mode 0640 | 104 | mode 0640 |
105 | end | 105 | end |
106 | 106 | ||
107 | -template '/etc/colab/settings.d/memcached.py' do | 107 | +template '/etc/colab/settings.d/04-memcached.py' do |
108 | owner 'root' | 108 | owner 'root' |
109 | group 'colab' | 109 | group 'colab' |
110 | mode 0640 | 110 | mode 0640 |
111 | end | 111 | end |
112 | 112 | ||
113 | -template '/etc/colab/settings.d/redis.py' do | 113 | +template '/etc/colab/settings.d/05-redis.py' do |
114 | owner 'root' | 114 | owner 'root' |
115 | group 'colab' | 115 | group 'colab' |
116 | mode 0640 | 116 | mode 0640 |
@@ -0,0 +1,37 @@ | @@ -0,0 +1,37 @@ | ||
1 | +## Set to false in production | ||
2 | +DEBUG = False | ||
3 | +TEMPLATE_DEBUG = False | ||
4 | + | ||
5 | +## System admins | ||
6 | +ADMINS = [ | ||
7 | +<%- node['config']['admins'].each do |admin| %> | ||
8 | + ("<%= admin[0] %>", "<%= admin[1] %>"), | ||
9 | +<% end %> | ||
10 | +] | ||
11 | + | ||
12 | +MANAGERS = ADMINS | ||
13 | + | ||
14 | +# general Django settings | ||
15 | +DEFAULT_FROM_EMAIL = '<%= node['config']['colab_from_address'] %>' | ||
16 | + | ||
17 | +# colab-specific | ||
18 | +COLAB_FROM_ADDRESS = '<%= node['config']['colab_from_address'] %>' | ||
19 | +SERVER_EMAIL = '<%= node['config']['server_email'] %>' | ||
20 | + | ||
21 | +EMAIL_HOST = "localhost" | ||
22 | +EMAIL_PORT = 25 | ||
23 | +EMAIL_SUBJECT_PREFIX = "<%= node['config']['email_subject_prefix'] %>" | ||
24 | + | ||
25 | +SECRET_KEY = "<%= File.read('/etc/colab/secret.key').strip %>" | ||
26 | + | ||
27 | +SITE_URL = "<%= node['config']['site_url'] %>" | ||
28 | + | ||
29 | +ALLOWED_HOSTS = ["<%= node['config']['external_hostname'] %>"] | ||
30 | + | ||
31 | +## Disable indexing | ||
32 | +ROBOTS_NOINDEX = False | ||
33 | + | ||
34 | +## Set URL of Colab home | ||
35 | +COLAB_HOME_URL = '/social' | ||
36 | + | ||
37 | +GOOGLE_ANALYTICS_TRACKING_ID = "<%= node['config']['google_analytics_id'] %>" |
cookbooks/colab/templates/00-database.py.erb
cookbooks/colab/templates/04-custom_settings.py.erb
@@ -1,37 +0,0 @@ | @@ -1,37 +0,0 @@ | ||
1 | -## Set to false in production | ||
2 | -DEBUG = False | ||
3 | -TEMPLATE_DEBUG = False | ||
4 | - | ||
5 | -## System admins | ||
6 | -ADMINS = [ | ||
7 | -<%- node['config']['admins'].each do |admin| %> | ||
8 | - ("<%= admin[0] %>", "<%= admin[1] %>"), | ||
9 | -<% end %> | ||
10 | -] | ||
11 | - | ||
12 | -MANAGERS = ADMINS | ||
13 | - | ||
14 | -# general Django settings | ||
15 | -DEFAULT_FROM_EMAIL = '<%= node['config']['colab_from_address'] %>' | ||
16 | - | ||
17 | -# colab-specific | ||
18 | -COLAB_FROM_ADDRESS = '<%= node['config']['colab_from_address'] %>' | ||
19 | -SERVER_EMAIL = '<%= node['config']['server_email'] %>' | ||
20 | - | ||
21 | -EMAIL_HOST = "localhost" | ||
22 | -EMAIL_PORT = 25 | ||
23 | -EMAIL_SUBJECT_PREFIX = "<%= node['config']['email_subject_prefix'] %>" | ||
24 | - | ||
25 | -SECRET_KEY = "<%= File.read('/etc/colab/secret.key').strip %>" | ||
26 | - | ||
27 | -SITE_URL = "<%= node['config']['site_url'] %>" | ||
28 | - | ||
29 | -ALLOWED_HOSTS = ["<%= node['config']['external_hostname'] %>"] | ||
30 | - | ||
31 | -## Disable indexing | ||
32 | -ROBOTS_NOINDEX = False | ||
33 | - | ||
34 | -## Set URL of Colab home | ||
35 | -COLAB_HOME_URL = '/social' | ||
36 | - | ||
37 | -GOOGLE_ANALYTICS_TRACKING_ID = "<%= node['config']['google_analytics_id'] %>" |
cookbooks/colab/templates/memcached.py.erb
cookbooks/colab/templates/redis.py.erb