1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

🔧 Better Ansible script

This commit is contained in:
Yohann D'ANELLO
2020-07-21 22:36:37 +02:00
parent 4761d46696
commit 5d70a809c2
7 changed files with 81 additions and 24 deletions

View File

@ -0,0 +1,27 @@
---
- 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
password: "CHANGE_ME"
become_user: postgres
- name: Create NK20 database
postgresql_db:
name: note_db
owner: note
become_user: postgres