Commit aa0bd11f authored by Ihor Kaharlichenko's avatar Ihor Kaharlichenko
Browse files

Add db role (PPL-139)

parent b86794cf
# This playbook will install PostgreSQL, create db, role and assign proper permissions.
- name: Install PostgreSQL package
name: '{{ item }}'
state: installed
- postgresql-9.1
- python-psycopg2 # postgresql_* tasks dependency
- name: Start PostgreSQL service
name: postgresql
state: started
enabled: true
# TODO: Check whether app server and db server are on different hosts and changepg_hba.conf if necessary
- name: Create Application DB User
name: '{{ db.user }}'
password: '{{ db.password }}'
state: present
sudo_user: postgres
- name: Create Application Database
postgresql_db: name={{ }} state=present owner={{ db.user }}
sudo_user: postgres
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment