add more db options
This commit is contained in:
parent
1d1d472ea4
commit
feee78918c
1 changed files with 13 additions and 8 deletions
|
|
@ -20,21 +20,26 @@
|
|||
notify:
|
||||
- restart postgres
|
||||
|
||||
- name: add postgresql dbs
|
||||
postgresql_db:
|
||||
name: "{{ item.key }}"
|
||||
become_user: postgres
|
||||
become: true
|
||||
with_dict: "{{ postgresql.dbs }}"
|
||||
|
||||
- name: add postgresql user(s)
|
||||
postgresql_user:
|
||||
community.postgresql.postgresql_user:
|
||||
name: "{{ item.key }}"
|
||||
password: "{{ item.value }}"
|
||||
become_user: postgres
|
||||
become: true
|
||||
with_dict: "{{ postgresql.users }}"
|
||||
|
||||
- name: add postgresql dbs
|
||||
community.postgresql.postgresql_db:
|
||||
name: "{{ item.key }}"
|
||||
owner: "{{ item.value.owner|d(omit) }}"
|
||||
encoding: "{{ item.value.encoding|d(omit) }}"
|
||||
template: "{{ item.value.template|d(omit) }}"
|
||||
lc_collate: "{{ item.value.lc_collate|d(omit) }}"
|
||||
lc_ctype: "{{ item.value.lc_ctype|d(omit) }}"
|
||||
become_user: postgres
|
||||
become: true
|
||||
with_dict: "{{ postgresql.dbs }}"
|
||||
|
||||
- name: add vacuum cronjob
|
||||
cron:
|
||||
name: db maintenance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue