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.
 
 

42 lines
2.0 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: (Deprecation) Catch and report renamed prometheus-nginxlog-exporter settings
  6. ansible.builtin.fail:
  7. msg: >-
  8. Your configuration contains a variable, which now has a different name.
  9. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  10. when: "item.old in vars"
  11. with_items:
  12. - {'old': 'matrix_prometheus_nginxlog_exporter_container_hostname', 'new': 'matrix_prometheus_nginxlog_exporter_identifier'}
  13. - name: Fail if docker image not availble for arch
  14. ansible.builtin.fail:
  15. msg: >
  16. 'prometheus-nginxlog-exporter' docker image is not available for your arch '{{ matrix_architecture }}'.
  17. We currently do not support building an image using this playbook.
  18. You can use a custom-build image by setting
  19. 'matrix_prometheus_nginxlog_exporter_docker_image_arch_check_enabled: false'
  20. 'matrix_prometheus_nginxlog_exporter_docker_image: path/to/docker/image:tag'
  21. or disable 'prometheus-nginxlog-exporter' by setting
  22. 'matrix_prometheus_nginxlog_exporter: false'
  23. in vars.yml
  24. when: matrix_prometheus_nginxlog_exporter_docker_image_arch_check_enabled and matrix_architecture not in matrix_prometheus_nginxlog_exporter_docker_image_arch
  25. - name: Fail if required prometheus-nginxlog-exporter settings not defined
  26. ansible.builtin.fail:
  27. msg: >-
  28. You need to define a required configuration setting (`{{ item.name }}`).
  29. when: "item.when | bool and vars[item.name] == ''"
  30. with_items:
  31. - {'name': 'matrix_prometheus_nginxlog_exporter_metrics_proxying_hostname', when: "{{ matrix_prometheus_nginxlog_exporter_metrics_proxying_enabled }}"}
  32. - {'name': 'matrix_prometheus_nginxlog_exporter_metrics_proxying_path_prefix', when: "{{ matrix_prometheus_nginxlog_exporter_metrics_proxying_enabled }}"}
  33. - {'name': 'matrix_prometheus_nginxlog_exporter_container_network', when: true}