You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.1KB

  1. ---
  2. - name: Install dependancy
  3. apt:
  4. name: "{{ packages }}"
  5. vars:
  6. packages:
  7. - lsb-release
  8. - curl
  9. - apt-transport-https
  10. - libpq-dev
  11. - name: Add an Apt signing key
  12. apt_key:
  13. url: "https://packages.matrix.org/debian/matrix-org-archive-keyring.asc"
  14. state: present
  15. - name: Add repo
  16. apt_repository:
  17. repo: "deb https://matrix.org/packages/debian stretch main"
  18. state: present
  19. - name: Install matrix
  20. apt:
  21. name: "{{ packages }}"
  22. update_cache: yes
  23. vars:
  24. packages:
  25. - matrix-synapse-py3
  26. - python-psycopg2
  27. - python3-psycopg2
  28. - name: Set template
  29. template:
  30. src: homeserver.yaml.j2
  31. dest: /etc/matrix-synapse/homeserver.yaml
  32. owner: root
  33. group: root
  34. mode: 0644
  35. - name: Set template
  36. template:
  37. src: log.yaml.j2
  38. dest: /etc/matrix-synapse/log.yaml
  39. owner: root
  40. group: root
  41. mode: 0644
  42. - name: Set template
  43. template:
  44. src: server_name.yaml.j2
  45. dest: /etc/matrix-synapse/conf.d/server_name.yaml
  46. owner: root
  47. group: root
  48. mode: 0644
  49. - name: Start service httpd, if not started
  50. service:
  51. name: matrix-synapse
  52. state: restarted