Skip to content

Instantly share code, notes, and snippets.

View parroty's full-sized avatar
🏠
Working from home

Kenta Nakase parroty

🏠
Working from home
View GitHub Profile
@exoer
exoer / db_server.rb
Created July 4, 2011 17:58 — forked from coderanger/db_server.rb
Create postgres users and databases from Chef
include_recipe "postgresql::server90"
# inspiration from
# https://gist.github.com/637579
execute "create-root-user" do
code = <<-EOH
psql -U postgres -c "select * from pg_user where usename='root'" | grep -c root
EOH
command "createuser -U postgres -s root"