This commit is contained in:
Geno 2020-11-13 21:23:39 +01:00
parent 535ea82dd3
commit ffa6735418
1 changed files with 26 additions and 0 deletions

26
tasks/main.yml Normal file
View File

@ -0,0 +1,26 @@
- name: DB - Install PostgreSQL
package:
name:
- postgresql
- python-psycopg2
- postgresql-old-upgrade
- postgis
- name: DB - Ensure a locale exists
locale_gen:
name: en_US.UTF-8
state: present
- name: DB - Init
become: yes
become_user: postgres
become_method: su
command: initdb --locale=en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data
args:
creates: /var/lib/postgres/data/postgresql.conf
- name: DB - starting
systemd:
name: postgresql
enabled: yes
state: started