Merge pull request 'postgres: fix defaults' (#75) from postgres into master
Reviewed-on: #75
This commit is contained in:
commit
a55efa8e24
3 changed files with 4 additions and 9 deletions
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
postgresql_hosts: []
|
||||
postgresql_databases: []
|
||||
postgresql_users: []
|
||||
...
|
|
@ -55,7 +55,7 @@
|
|||
lc_collate: en_US.UTF-8
|
||||
lc_ctype: en_US.UTF-8
|
||||
template: template0
|
||||
loop: "{{ postgresql.databases }}"
|
||||
loop: "{{ postgresql.databases | default([]) }}"
|
||||
|
||||
- name: Create users
|
||||
become: true
|
||||
|
@ -65,7 +65,7 @@
|
|||
name: "{{ item.name }}"
|
||||
password: "{{ item.password }}"
|
||||
no_log: true
|
||||
loop: "{{ postgresql.users }}"
|
||||
loop: "{{ postgresql.users | default([]) }}"
|
||||
|
||||
- name: Grant privileges to users
|
||||
become: true
|
||||
|
@ -77,5 +77,5 @@
|
|||
privs: "{{ item.privs | join(',') }}"
|
||||
obj: "{{ item.database }}"
|
||||
no_log: true
|
||||
loop: "{{ postgresql.users }}"
|
||||
loop: "{{ postgresql.users | default([]) }}"
|
||||
...
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
local all postgres peer map=map_local
|
||||
{% for host in postgresql.hosts %}
|
||||
{% for host in postgresql.hosts | default([]) %}
|
||||
host "{{ host.database }}" "{{ host.user }}" {{ host.net }} {{ host.method }}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue