Matrix Docker Ansible eploy
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.
 
 
 

64 lines
2.1 KiB

  1. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Include roles for matrix-synapse-auto-compressor Molecule tests
  6. hosts: all
  7. become: true
  8. vars_files:
  9. - "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../../../molecule-shared/vars.yml"
  10. - "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../../../molecule-shared/playbook-context.yml"
  11. gather_facts: true
  12. tasks:
  13. - name: Include base roles for matrix-synapse-auto-compressor Molecule tests
  14. ansible.builtin.include_role:
  15. name: "{{ role_name }}"
  16. public: true
  17. loop:
  18. - com.devture.ansible.role.playbook_help
  19. - com.devture.ansible.role.systemd_docker_base
  20. loop_control:
  21. loop_var: role_name
  22. # A genuine Synapse installation and migration is part of the fixture; hand-made subsets
  23. # of the schema cannot establish compatibility with what Synapse actually deploys.
  24. - name: Include Synapse setup task files
  25. ansible.builtin.include_role:
  26. name: custom/matrix-synapse
  27. public: true
  28. tasks_from: "{{ role_task_file }}"
  29. loop:
  30. - init.yml
  31. - validate_config.yml
  32. - setup_install.yml
  33. loop_control:
  34. loop_var: role_task_file
  35. - name: Include matrix-synapse-auto-compressor
  36. ansible.builtin.include_role:
  37. name: "custom/{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
  38. public: true
  39. vars:
  40. matrix_synapse_auto_compressor_postgres_image: "{{ molecule_shared_image_postgres }}"
  41. - name: Start the Synapse fixture and compressor timer
  42. hosts: all
  43. become: true
  44. gather_facts: false
  45. tasks:
  46. - name: Ensure systemd daemon is reloaded
  47. ansible.builtin.systemd_service:
  48. daemon_reload: true
  49. - name: Ensure the Synapse systemd service is started
  50. ansible.builtin.systemd_service:
  51. name: matrix-synapse.service
  52. state: started
  53. - name: Ensure the compressor timer is enabled and started
  54. ansible.builtin.systemd_service:
  55. name: matrix-synapse-auto-compressor.timer
  56. enabled: true
  57. state: started