Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

58 строки
2.8 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Ensure matrix-synapse-reverse-proxy-companion paths exist
  6. ansible.builtin.file:
  7. path: "{{ item }}"
  8. state: directory
  9. mode: 0750
  10. owner: "{{ matrix_user_username }}"
  11. group: "{{ matrix_user_groupname }}"
  12. with_items:
  13. - "{{ matrix_synapse_reverse_proxy_companion_base_path }}"
  14. - "{{ matrix_synapse_reverse_proxy_companion_confd_path }}"
  15. - name: Ensure matrix-synapse-reverse-proxy-companion is configured
  16. ansible.builtin.template:
  17. src: "{{ item.src }}"
  18. dest: "{{ item.dest }}"
  19. owner: "{{ matrix_user_username }}"
  20. group: "{{ matrix_user_groupname }}"
  21. mode: 0644
  22. with_items:
  23. - src: "{{ role_path }}/templates/nginx/nginx.conf.j2"
  24. dest: "{{ matrix_synapse_reverse_proxy_companion_base_path }}/nginx.conf"
  25. - src: "{{ role_path }}/templates/nginx/conf.d/nginx-http.conf.j2"
  26. dest: "{{ matrix_synapse_reverse_proxy_companion_confd_path }}/nginx-http.conf"
  27. - src: "{{ role_path }}/templates/nginx/conf.d/matrix-synapse-reverse-proxy-companion.conf.j2"
  28. dest: "{{ matrix_synapse_reverse_proxy_companion_confd_path }}/matrix-synapse-reverse-proxy-companion.conf"
  29. - src: "{{ role_path }}/templates/labels.j2"
  30. dest: "{{ matrix_synapse_reverse_proxy_companion_base_path }}/labels"
  31. - name: Ensure matrix-synapse-reverse-proxy-companion nginx container image is pulled
  32. community.docker.docker_image:
  33. name: "{{ matrix_synapse_reverse_proxy_companion_container_image }}"
  34. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  35. force_source: "{{ matrix_synapse_reverse_proxy_companion_container_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  36. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_synapse_reverse_proxy_companion_container_image_force_pull }}"
  37. register: result
  38. retries: "{{ devture_playbook_help_container_retries_count }}"
  39. delay: "{{ devture_playbook_help_container_retries_delay }}"
  40. until: result is not failed
  41. - name: Ensure matrix-synapse-reverse-proxy-companion container network is created
  42. community.general.docker_network:
  43. enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
  44. name: "{{ matrix_synapse_reverse_proxy_companion_container_network }}"
  45. driver: bridge
  46. driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
  47. - name: Ensure matrix-synapse-reverse-proxy-companion.service installed
  48. ansible.builtin.template:
  49. src: "{{ role_path }}/templates/systemd/matrix-synapse-reverse-proxy-companion.service.j2"
  50. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-reverse-proxy-companion.service"
  51. mode: 0644