25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
832B

  1. ---
  2. - name: postgresql user
  3. postgresql_user:
  4. name: "{{ onlyoffice_db_user }}"
  5. password: "{{ onlyoffice_db_pass }}"
  6. delegate_to: "{{ (onlyoffice_db_host != 'localhost') | ternary(onlyoffice_db_host,inventory_hostname) }}"
  7. become: yes
  8. become_user: postgres
  9. - name: postgresql database
  10. postgresql_db:
  11. name: "{{onlyoffice_db_name}}"
  12. owner: "{{onlyoffice_db_user}}"
  13. delegate_to: "{{ (onlyoffice_db_host != 'localhost') | ternary(onlyoffice_db_host,inventory_hostname) }}"
  14. become: yes
  15. become_user: postgres
  16. - name: postgresql access
  17. postgresql_privs:
  18. db: "{{onlyoffice_db_name}}"
  19. privs: ALL
  20. type: database
  21. role: "{{ onlyoffice_db_user }}"
  22. delegate_to: "{{ (onlyoffice_db_host != 'localhost') | ternary(onlyoffice_db_host,inventory_hostname) }}"
  23. become: yes
  24. become_user: postgres