1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-01-16 21:21:17 +00:00

26 lines
557 B
YAML
Raw Normal View History

2020-07-15 10:09:28 +02: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: Create role note
2020-10-30 20:54:41 +01:00
when: DB_PASSWORD|length > 0 # If the password is not defined, skip the installation
2020-07-15 10:09:28 +02:00
postgresql_user:
name: note
2020-08-01 16:32:26 +02:00
password: "{{ DB_PASSWORD }}"
2020-07-15 10:09:28 +02:00
become_user: postgres
- name: Create NK20 database
2020-10-30 20:54:41 +01:00
when: DB_PASSWORD|length >0
2020-07-15 10:09:28 +02:00
postgresql_db:
name: note_db
owner: note
become_user: postgres