28 lines
750 B
YAML
28 lines
750 B
YAML
---
|
|
- 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
|