diff --git a/chef/cookbooks/common/recipes/main.rb b/chef/cookbooks/common/recipes/main.rb index cf1322268..ec5654333 100644 --- a/chef/cookbooks/common/recipes/main.rb +++ b/chef/cookbooks/common/recipes/main.rb @@ -1,2 +1,8 @@ include_recipe "common::iptables" include_recipe "common::daemontools" + +require 'active_support' +template "/usr/local/app/diaspora/config/initializers/secret_token.rb" do + source "secret_token.rb.erb" + variables :secret_token => ActiveSupport::SecureRandom.hex(40) +end diff --git a/chef/cookbooks/common/templates/default/secret_token.rb.erb b/chef/cookbooks/common/templates/default/secret_token.rb.erb new file mode 100644 index 000000000..ef4543b33 --- /dev/null +++ b/chef/cookbooks/common/templates/default/secret_token.rb.erb @@ -0,0 +1 @@ +Rails.application.config.secret_token = '<%= @secret_token %>'