1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-25 00:42:22 +00:00
nk20/ansible/roles/6-psql/tasks/main.yml

28 lines
499 B
YAML
Raw Normal View History

2020-07-15 08:09:28 +00:00
---
- name: Install PostgreSQL APT packages
apt:
update_cache: true
name:
- postgresql
- postgresql-contrib
- libpq-dev
register: pkg_result
retries: 3
until: pkg_result is succeeded
- name: Install Psycopg2
pip:
name: psycopg2-binary
- name: Create role note
postgresql_user:
name: note
2020-08-01 14:32:26 +00:00
password: "{{ DB_PASSWORD }}"
2020-07-15 08:09:28 +00:00
become_user: postgres
- name: Create NK20 database
postgresql_db:
name: note_db
owner: note
become_user: postgres