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.
 
 
 

54 lines
1.9 KiB

  1. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Include roles for matrix-client-element Molecule tests
  6. hosts: all
  7. become: true
  8. vars_files:
  9. - "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../../../molecule-shared/playbook-context.yml"
  10. gather_facts: true
  11. tasks:
  12. - name: Include base roles for matrix-client-element Molecule tests
  13. ansible.builtin.include_role:
  14. name: "{{ role_name }}"
  15. public: true
  16. loop:
  17. - com.devture.ansible.role.playbook_help
  18. - com.devture.ansible.role.systemd_docker_base
  19. loop_control:
  20. loop_var: role_name
  21. # The role's main task file also carries the separately-invoked `self-check`
  22. # action. A tagless include would run it before systemd_service_manager has
  23. # started the component. Include the same setup task files selected by the
  24. # playbook's setup-client-element tag, then start the unit below.
  25. - name: Include matrix-client-element setup task files
  26. ansible.builtin.include_role:
  27. name: "custom/{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
  28. public: true
  29. tasks_from: "{{ role_task_file }}"
  30. loop:
  31. - validate_config.yml
  32. - prepare_themes.yml
  33. - setup_install.yml
  34. loop_control:
  35. loop_var: role_task_file
  36. # The component role installs its unit; systemd_service_manager starts it in the
  37. # full playbook. Start it directly here so the scenario remains role-scoped.
  38. - name: Ensure matrix-client-element is started
  39. hosts: all
  40. become: true
  41. gather_facts: false
  42. tasks:
  43. - name: Ensure systemd daemon is reloaded
  44. ansible.builtin.systemd_service:
  45. daemon_reload: true
  46. - name: Ensure matrix-client-element systemd service is started
  47. ansible.builtin.systemd_service:
  48. name: matrix-client-element.service
  49. state: started