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.
 
 

36 lines
2.1 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: (Deprecation) Catch and report renamed coturn settings
  7. ansible.builtin.fail:
  8. msg: >-
  9. Your configuration contains a variable, which now has a different name.
  10. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  11. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  12. with_items:
  13. - {'old': 'matrix_coturn_docker_network', 'new': 'matrix_coturn_container_network'}
  14. - {'old': 'matrix_coturn_container_stun_plain_host_bind_port', 'new': 'superseded by matrix_coturn_container_stun_plain_host_bind_port_tcp and matrix_coturn_container_stun_plain_host_bind_port_udp'}
  15. - {'old': 'matrix_coturn_container_stun_tls_host_bind_port', 'new': 'superseded by matrix_coturn_container_stun_tls_host_bind_port_tcp and matrix_coturn_container_stun_tls_host_bind_port_udp'}
  16. - {'old': 'matrix_coturn_container_image_name_prefix', 'new': 'matrix_coturn_docker_image_registry_prefix'}
  17. - name: Fail if matrix_coturn_authentication_method is invalid
  18. ansible.builtin.fail:
  19. msg: >-
  20. Invalid authentication method specified in `matrix_coturn_authentication_method`
  21. when: "matrix_coturn_authentication_method not in ['auth-secret', 'lt-cred-mech']"
  22. - name: Fail if required coturn settings not defined
  23. ansible.builtin.fail:
  24. msg: >-
  25. You need to define a required configuration setting (`{{ item.name }}`).
  26. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  27. with_items:
  28. - {'name': 'matrix_coturn_hostname', when: true}
  29. - {'name': 'matrix_coturn_turn_static_auth_secret', when: "{{ matrix_coturn_authentication_method == 'auth-secret' }}"}
  30. - {'name': 'matrix_coturn_lt_cred_mech_username', when: "{{ matrix_coturn_authentication_method == 'lt-cred-mech' }}"}
  31. - {'name': 'matrix_coturn_lt_cred_mech_password', when: "{{ matrix_coturn_authentication_method == 'lt-cred-mech' }}"}