2019-04-08 11:22:54 +02:00

32 lines
690 B
Ruby

#
# Cookbook:: kosmos-postgresql
# Recipe:: default
#
# Copyright:: 2019, Kosmos, All Rights Reserved.
return if platform?('ubuntu') && node[:platform_version].to_f < 18.04
node.override['build-essential']['compile_time'] = true
include_recipe 'build-essential::default'
package("libpq-dev") { action :nothing }.run_action(:install)
chef_gem 'pg' do
compile_time true
end
postgresql_data_bag_item = data_bag_item('credentials', 'postgresql')
postgresql_server_install "main" do
version "10"
setup_repo false
password postgresql_data_bag_item['server_password']
action :install
end
postgresql_client_install "main" do
version "10"
setup_repo false
action :install
end