-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpostgresql.yml
More file actions
29 lines (29 loc) · 979 Bytes
/
Copy pathpostgresql.yml
File metadata and controls
29 lines (29 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
- hosts: localhost
connection: local
tasks:
- name: PostgreSQL repo installed
dnf:
name: https://download.postgresql.org/pub/repos/yum/9.5/fedora/fedora-24-x86_64/pgdg-fedora95-9.5-3.noarch.rpm
state: present
become: yes
- name: PostgreSQL Database Server 9.5 installed
dnf:
name: '{{ item }}'
state: present
with_items:
- "@PostgreSQL Database Server 9.5 PGDG"
- postgresql95-devel
become: yes
- name: cluster initialized
command: /usr/pgsql-9.5/bin/postgresql95-setup initdb
args:
creates: /var/lib/pgsql/9.5/data/pg_hba.conf
environment:
PGSETUP_INITDB_OPTIONS: -E UTF8 --auth-local peer --auth-host md5
become: yes
# TODO: createuser -dsR migonzalvar
#
# ALTER ROLE migonzalvar SET client_encoding TO 'utf8';
# ALTER ROLE migonzalvar SET default_transaction_isolation TO 'read committed';
# ALTER ROLE migonzalvar SET timezone TO 'UTC';