Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

37 linhas
1.2KB

  1. ---
  2. - name: debian packages required for database management
  3. apt:
  4. pkg: python-psycopg2
  5. delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
  6. - name: postgresql user
  7. postgresql_user:
  8. name: "{{ nextcloud_database_user }}"
  9. password: "{{ nextcloud_database_pass }}"
  10. delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
  11. become: yes
  12. become_user: postgres
  13. - name: postgresql database
  14. postgresql_db:
  15. name: "{{nextcloud_database_name}}"
  16. encoding: UTF-8
  17. lc_collate: "{{nextcloud_postgresql_lc}}"
  18. lc_ctype: "{{nextcloud_postgresql_lc}}"
  19. template: template0
  20. owner: "{{nextcloud_database_user}}"
  21. delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
  22. become: yes
  23. become_user: postgres
  24. - name: postgresql access
  25. postgresql_privs:
  26. db: "{{nextcloud_database_name}}"
  27. privs: ALL
  28. type: database
  29. role: "{{ nextcloud_database_user }}"
  30. delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
  31. become: yes
  32. become_user: postgres