Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 15 lines (11 sloc) 0.587 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Chef::Log.warn 'Please use https://github.com/pivotal-sprout/sprout instead'

include_recipe "pivotal_workstation::postgres"

postgres_databases = `psql -U postgres -c '\\list' | cut -d' ' -f 2 | grep -v '^template' | tail +4`.split("\n")

# the last 4 lines are noise from psql
postgres_databases[0...-4].each do |database|
  execute "install the citext module into #{database}" do
    command "/usr/local/bin/psql -U postgres -d #{database} -c 'CREATE EXTENSION citext'"
    user WS_USER
    not_if "/usr/local/bin/psql -U postgres -d #{database} -c '\\dT' | grep -i citext"
  end
end
Something went wrong with that request. Please try again.