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.
 
 

39 lines
2.0 KiB

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