|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
apt:
|
|
|
|
|
update_cache: yes
|
|
|
|
|
name:
|
|
|
|
|
- acl # Don't ask me, required by postgresql_user
|
|
|
|
|
- postgresql
|
|
|
|
|
- postgresql-contrib
|
|
|
|
|
- libpq-dev
|
|
|
|
@ -45,21 +46,21 @@
|
|
|
|
|
become: true
|
|
|
|
|
become_user: postgres
|
|
|
|
|
postgresql_query:
|
|
|
|
|
query: "ALTER ROLE {{ item.name }} SET client_encoding TO 'utf8'"
|
|
|
|
|
loop: "{{ databases }}"
|
|
|
|
|
query: "ALTER ROLE {{ item }} SET client_encoding TO 'utf8'"
|
|
|
|
|
loop: "{{ postgres_users | map(attribute='name') }}"
|
|
|
|
|
|
|
|
|
|
- name: Set encoding
|
|
|
|
|
become: true
|
|
|
|
|
become_user: postgres
|
|
|
|
|
postgresql_query:
|
|
|
|
|
query: "ALTER ROLE {{ item.name }} SET default_transaction_isolation TO 'read committed'"
|
|
|
|
|
when: "{{ item.read_committed | default(false) }}"
|
|
|
|
|
loop: "{{ databases }}"
|
|
|
|
|
query: "ALTER ROLE {{ item }} SET default_transaction_isolation TO 'read committed'"
|
|
|
|
|
when: item.read_committed | default(false)
|
|
|
|
|
loop: "{{ postgres_users | map(attribute='name') }}"
|
|
|
|
|
|
|
|
|
|
- name: Set timezone
|
|
|
|
|
become: true
|
|
|
|
|
become_user: postgres
|
|
|
|
|
postgresql_query:
|
|
|
|
|
query: "ALTER ROLE {{ item.name }} SET timezone TO 'CET'"
|
|
|
|
|
loop: "{{ databases }}"
|
|
|
|
|
query: "ALTER ROLE {{ item }} SET timezone TO 'CET'"
|
|
|
|
|
loop: "{{ postgres_users | map(attribute='name') }}"
|
|
|
|
|
|
|
|
|
|