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

48 строки
2.1 KiB

  1. ---
  2. - when: matrix_cactus_comments_enabled | bool and matrix_cactus_comments_serve_client_enabled | bool
  3. tags:
  4. - always
  5. block:
  6. - name: Fail if matrix-nginx-proxy role already executed
  7. ansible.builtin.fail:
  8. msg: >-
  9. Trying to append Cactus Comment's reverse-proxying configuration to matrix-nginx-proxy,
  10. but it's pointless since the matrix-nginx-proxy role had already executed.
  11. To fix this, please change the order of roles in your playbook,
  12. so that the matrix-nginx-proxy role would run after the matrix-cactus-comments role.
  13. when: matrix_nginx_proxy_role_executed | default(False) | bool
  14. - name: Mount volume
  15. ansible.builtin.set_fact:
  16. matrix_nginx_proxy_container_additional_volumes: >
  17. {{
  18. matrix_nginx_proxy_container_additional_volumes | default([])
  19. +
  20. [{"src": "{{ matrix_cactus_comments_client_path }}", "dst": "/cactus-comments/cactus-comments", "options": "ro"}]
  21. }}
  22. - name: Generate Cactus Comment proxying configuration for matrix-nginx-proxy
  23. ansible.builtin.set_fact:
  24. matrix_cactus_comments_nginx_proxy_configuration: |
  25. location {{ matrix_cactus_comments_client_endpoint }} {
  26. root {{ matrix_cactus_comments_client_nginx_path }};
  27. }
  28. - name: Register Cactus Comment proxying configuration with matrix-nginx-proxy
  29. ansible.builtin.set_fact:
  30. matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks: |
  31. {{
  32. matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks | default([])
  33. +
  34. [matrix_cactus_comments_nginx_proxy_configuration]
  35. }}
  36. - name: Warn about reverse-proxying if matrix-nginx-proxy not used
  37. ansible.builtin.debug:
  38. msg: >-
  39. NOTE: You've enabled Cactus Comments but are not using the matrix-nginx-proxy
  40. reverse proxy.
  41. Please make sure that you're proxying client files in {{ matrix_cactus_comments_client_path }} correctly
  42. when: "not matrix_nginx_proxy_enabled | default(False) | bool"