removed chef vendor

This commit is contained in:
2020-04-11 22:44:33 -04:00
parent 94b21f7d4c
commit d39c423da0
33 changed files with 219 additions and 826 deletions

View File

@ -23,7 +23,7 @@ property :owner, String
# Connection prefernces
property :user, String, default: 'postgres'
property :database, String, name_property: true
property :host, [String, nil], default: nil
property :host, String
property :port, Integer, default: 5432
action :create do

View File

@ -21,11 +21,11 @@ property :source, String, default: 'pg_ident.conf.erb'
property :cookbook, String, default: 'postgresql'
property :system_user, String, required: true
property :pg_user, String, required: true
property :comment, [String, nil], default: nil
property :comment, String
action :create do
ident_resource = new_resource
with_run_context :root do # ~FC037
with_run_context :root do
edit_resource(:template, "#{conf_dir}/pg_ident.conf") do |new_resource|
source new_resource.source
cookbook new_resource.cookbook

View File

@ -1,4 +1,3 @@
# frozen_string_literal: true
#
# Cookbook:: postgresql
# Resource:: server_install
@ -26,6 +25,7 @@ property :external_pid_file, String, default: lazy { "/var/run/postgresql/#{vers
property :password, [String, nil], default: 'generate' # Set to nil if we do not want to set a password
property :port, Integer, default: 5432
property :initdb_locale, String
property :initdb_encoding, String
# Connection preferences
property :user, String, default: 'postgres'
@ -41,6 +41,23 @@ action :install do
setup_repo new_resource.setup_repo
end
# First install the postgresql-common package
if platform_family?('debian')
package 'postgresql-common'
initdb_options = ''
initdb_options << "--locale #{new_resource.initdb_locale}" if new_resource.initdb_locale
initdb_options << " -E #{new_resource.initdb_encoding}" if new_resource.initdb_encoding
template '/etc/postgresql-common/createcluster.conf' do
source 'createcluster.conf.erb'
cookbook 'postgresql'
variables(
initdb_options: initdb_options
)
end
end
package server_pkg_name
end