initial import

This commit is contained in:
2019-03-16 20:03:39 +01:00
parent 5f54684dd8
commit 9bb1d70962
3 changed files with 45 additions and 0 deletions

27
tasks/main.yml Normal file
View File

@ -0,0 +1,27 @@
---
- name: update apk cache
apk: update_cache=yes
- name: install postgresql
apk: name=postgresql state=present
- name: install postgresql-client
apk: name=postgresql-client state=present
- name: copy postgresql.conf
copy: src=postgresql.conf dest=/var/lib/postgresql/9.5/data/postgresql.conf owner=postgres group=postgres mode=0600
- name: copy pg_hba.conf
copy: src=pg_hba.conf dest=/var/lib/postgresql/9.5/data/pg_hba.conf owner=postgres group=postgres mode=0600
- name: stop postgresql
command: rc-service postgresql stop
- name: setup db cluster
command: /etc/init.d/postgresql setup
- name: start postgresql
command: rc-service postgresql restart
- name: enable postgresql
command: rc-update add postgresql default