crowbar/crowbar-openstack

View on GitHub
chef/cookbooks/postgresql/recipes/apt_pgdg_postgresql.rb

Summary

Maintainability
A
0 mins
Test Coverage
if not %w(jessie squeeze wheezy sid lucid precise saucy trusty).include? node["postgresql"]["pgdg"]["release_apt_codename"]
  raise "Not supported release by PGDG apt repository"
end

include_recipe "apt"

file "remove deprecated Pitti PPA apt repository" do
  action :delete
  path "/etc/apt/sources.list.d/pitti-postgresql-ppa"
end

apt_repository "apt.postgresql.org" do
  uri "http://apt.postgresql.org/pub/repos/apt"
  distribution "#{node['postgresql']['pgdg']['release_apt_codename']}-pgdg"
  components ["main", node["postgresql"]["version"]]
  key "http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc"
  action :add
end