net-ops/global/overlay/etc/puppet/modules/net/templates/cisoassistant/init-db.sh.erb

9 lines
No EOL
325 B
Text

#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER "ciso-assistantuser";
ALTER USER "ciso-assistantuser" WITH PASSWORD '<%= @postgres_user_password %>';
CREATE DATABASE "ciso-assistant";
GRANT ALL PRIVILEGES ON DATABASE "ciso-assistant" TO "ciso-assistantuser";
EOSQL