From 1cf81473d121de3d6cf52ed4ac3531779e5168ae Mon Sep 17 00:00:00 2001 From: William Mantly Date: Tue, 28 May 2019 00:23:04 -0400 Subject: [PATCH] Postgres repo --- metadata.rb | 2 +- recipes/postgres.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index cd061c3..e2eb824 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'you@example.com' license 'All Rights Reserved' description 'Installs/Configures t42-common' long_description 'Installs/Configures t42-common' -version '0.1.2' +version '0.1.3' chef_version '>= 13.0' depends 'nodejs' diff --git a/recipes/postgres.rb b/recipes/postgres.rb index 5e99705..b9853ab 100644 --- a/recipes/postgres.rb +++ b/recipes/postgres.rb @@ -1,3 +1,12 @@ +execute 'add key' do + command 'wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -' +end + +execute 'add repo' do + command 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' +end + + apt_update 'update' do end.run_action(:update) if platform_family?('debian')