Set postgresql password from an encrypted data bag
This commit is contained in:
@@ -4,9 +4,21 @@
|
||||
#
|
||||
# Copyright:: 2019, Kosmos, All Rights Reserved.
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user