Set up an instance of Mastodon for Kosmos

Refs #19

Use new application cookbook, update our cookbooks
This commit is contained in:
Greg Karékinian
2017-04-06 21:20:51 +02:00
parent a3f5c5f646
commit de11c0d691
345 changed files with 22591 additions and 3473 deletions

View File

@@ -1,5 +1,6 @@
# frozen_string_literal: true
#
# Cookbook Name:: postgresql
# Cookbook:: postgresql
# Recipe:: config_initdb
# Author:: David Crane (<davidc@donorschoose.org>)
#
@@ -69,23 +70,23 @@
# Locale Configuration
# See libraries/default.rb for the locale_date_order() method.
node.default['postgresql']['config']['datestyle'] = "iso, #{locale_date_order()}"
node.default['postgresql']['config']['datestyle'] = "iso, #{locale_date_order}"
# According to the locale(1) manpage, the locale settings are determined
# by environment variables according to the following precedence:
# LC_ALL > (LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) > LANG.
node.default['postgresql']['config']['lc_messages'] =
[ ENV['LC_ALL'], ENV['LC_MESSAGES'], ENV['LANG'] ].compact.first
[ENV['LC_ALL'], ENV['LC_MESSAGES'], ENV['LANG']].compact.first
node.default['postgresql']['config']['lc_monetary'] =
[ ENV['LC_ALL'], ENV['LC_MONETARY'], ENV['LANG'] ].compact.first
[ENV['LC_ALL'], ENV['LC_MONETARY'], ENV['LANG']].compact.first
node.default['postgresql']['config']['lc_numeric'] =
[ ENV['LC_ALL'], ENV['LC_NUMERIC'], ENV['LANG'] ].compact.first
[ENV['LC_ALL'], ENV['LC_NUMERIC'], ENV['LANG']].compact.first
node.default['postgresql']['config']['lc_time'] =
[ ENV['LC_ALL'], ENV['LC_TIME'], ENV['LANG'] ].compact.first
[ENV['LC_ALL'], ENV['LC_TIME'], ENV['LANG']].compact.first
node.default['postgresql']['config']['default_text_search_config'] =
case ENV['LANG']
@@ -119,8 +120,6 @@ node.default['postgresql']['config']['default_text_search_config'] =
'pg_catalog.swedish'
when /tr_.*/
'pg_catalog.turkish'
else
nil
end
#######
@@ -130,11 +129,11 @@ node.default['postgresql']['config']['default_text_search_config'] =
# defaults for the postgresql.cof settings. If the timezone cannot be
# identified, do as initdb would do: leave it unspecified so PostgreSQL
# uses it's internal default of GMT.
tzdirpath = pg_TZDIR() # See libraries/default.rb
tzdirpath = pg_TZDIR # See libraries/default.rb
default_timezone = select_default_timezone(tzdirpath) # See libraries/default.rb
if !default_timezone.nil?
node.default['postgresql']['config']['log_timezone'] = default_timezone
node.default['postgresql']['config']['timezone'] = default_timezone
unless default_timezone.nil?
node.default['postgresql']['config']['log_timezone'] = default_timezone
node.default['postgresql']['config']['timezone'] = default_timezone
end
#######