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

64 lines
2.3 KiB

  1. # SPDX-FileCopyrightText: 2025 MDAD project contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Ensure conduwuit config path exists
  6. ansible.builtin.file:
  7. path: "{{ matrix_conduwuit_config_path }}"
  8. state: directory
  9. mode: 0750
  10. owner: "{{ matrix_user_name }}"
  11. group: "{{ matrix_group_name }}"
  12. - name: Ensure conduwuit data path exists
  13. ansible.builtin.file:
  14. path: "{{ matrix_conduwuit_data_path }}"
  15. state: directory
  16. mode: 0770
  17. owner: "{{ matrix_user_name }}"
  18. group: "{{ matrix_group_name }}"
  19. - name: Ensure conduwuit configuration installed
  20. ansible.builtin.template:
  21. src: "{{ matrix_conduwuit_template_conduwuit_config }}"
  22. dest: "{{ matrix_conduwuit_config_path }}/conduwuit.toml"
  23. mode: 0644
  24. owner: "{{ matrix_user_name }}"
  25. group: "{{ matrix_group_name }}"
  26. - name: Ensure conduwuit support files installed
  27. ansible.builtin.template:
  28. src: "{{ role_path }}/templates/{{ item }}.j2"
  29. dest: "{{ matrix_conduwuit_base_path }}/{{ item }}"
  30. mode: 0640
  31. owner: "{{ matrix_user_name }}"
  32. group: "{{ matrix_group_name }}"
  33. with_items:
  34. - labels
  35. - name: Ensure conduwuit container network is created
  36. community.general.docker_network:
  37. enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
  38. name: "{{ matrix_conduwuit_container_network }}"
  39. driver: bridge
  40. driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
  41. - name: Ensure conduwuit container image is pulled
  42. community.docker.docker_image:
  43. name: "{{ matrix_conduwuit_docker_image }}"
  44. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  45. force_source: "{{ matrix_conduwuit_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  46. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_conduwuit_docker_image_force_pull }}"
  47. register: result
  48. retries: "{{ devture_playbook_help_container_retries_count }}"
  49. delay: "{{ devture_playbook_help_container_retries_delay }}"
  50. until: result is not failed
  51. - name: Ensure matrix-conduwuit.service installed
  52. ansible.builtin.template:
  53. src: "{{ role_path }}/templates/systemd/matrix-conduwuit.service.j2"
  54. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduwuit.service"
  55. mode: 0644