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

38 строки
1.6 KiB

  1. # SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2020 Scott Crossen
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if no matrix-dynamic-dns configurations specified
  7. ansible.builtin.fail:
  8. msg: >-
  9. You need to define at least one configuration in `matrix_dynamic_dns_domain_configurations` for using matrix-dynamic-dns.
  10. when: "matrix_dynamic_dns_domain_configurations | length == 0"
  11. - name: Fail if required matrix-dynamic-dns settings not defined in configuration blocks
  12. ansible.builtin.fail:
  13. msg: >-
  14. One of the configurations in matrix_dynamic_dns_domain_configurations is missing a required key (domain, protocol).
  15. when: "'domain' not in configuration or 'protocol' not in configuration"
  16. with_items: "{{ matrix_dynamic_dns_domain_configurations }}"
  17. loop_control:
  18. loop_var: configuration
  19. - name: Fail if required matrix-dynamic-dns settings not defined
  20. ansible.builtin.fail:
  21. msg: >-
  22. You need to define a required configuration setting (`{{ item.name }}`).
  23. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  24. with_items:
  25. - {'name': 'matrix_dynamic_dns_container_network', when: true}
  26. - name: (Deprecation) Catch and report renamed matrix-dynamic-dns variables
  27. ansible.builtin.fail:
  28. msg: >-
  29. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  30. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  31. with_items:
  32. - {'old': 'matrix_dynamic_dns_container_image_name_prefix', 'new': 'matrix_dynamic_dns_docker_image_registry_prefix'}