|
- ---
-
- - name: postgresql user
- postgresql_user:
- name: "{{ onlyoffice_db_user }}"
- password: "{{ onlyoffice_db_pass }}"
- delegate_to: "{{ (onlyoffice_db_host != 'localhost') | ternary(onlyoffice_db_host,inventory_hostname) }}"
- become: yes
- become_user: postgres
-
- - name: postgresql database
- postgresql_db:
- name: "{{onlyoffice_db_name}}"
- owner: "{{onlyoffice_db_user}}"
- delegate_to: "{{ (onlyoffice_db_host != 'localhost') | ternary(onlyoffice_db_host,inventory_hostname) }}"
- become: yes
- become_user: postgres
-
- - name: postgresql access
- postgresql_privs:
- db: "{{onlyoffice_db_name}}"
- privs: ALL
- type: database
- role: "{{ onlyoffice_db_user }}"
- delegate_to: "{{ (onlyoffice_db_host != 'localhost') | ternary(onlyoffice_db_host,inventory_hostname) }}"
- become: yes
- become_user: postgres
|