master
Geno 2 years ago
parent 535ea82dd3
commit ffa6735418
  1. 26
      tasks/main.yml

@ -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
Loading…
Cancel
Save