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.
 
 

29 lines
1.3 KiB

  1. ---
  2. - name: Fail if matrix-nginx-proxy role executed before matrix-prometheus-services-proxy-connect
  3. when: matrix_nginx_proxy_role_executed | default(False) | bool
  4. ansible.builtin.fail:
  5. msg: >-
  6. Trying to append node-exporter's reverse-proxying configuration to matrix-nginx-proxy,
  7. but it's pointless since the matrix-nginx-proxy role had already executed.
  8. To fix this, please change the order of roles in your playbook,
  9. so that the matrix-nginx-proxy role would run after the matrix-prometheus-services-proxy-connect role.
  10. - tags:
  11. - setup-all
  12. - setup-nginx-proxy
  13. - install-all
  14. - install-nginx-proxy
  15. block:
  16. - when: prometheus_node_exporter_enabled | bool and matrix_prometheus_services_proxy_connect_prometheus_node_exporter_metrics_proxying_enabled | bool
  17. ansible.builtin.include_tasks: "{{ role_path }}/tasks/prometheus-node-exporter/inject_into_nginx_proxy.yml"
  18. - tags:
  19. - setup-all
  20. - setup-nginx-proxy
  21. - install-all
  22. - install-nginx-proxy
  23. block:
  24. - when: prometheus_node_exporter_enabled | bool and matrix_prometheus_services_proxy_connect_prometheus_postgres_exporter_metrics_proxying_enabled | bool
  25. ansible.builtin.include_tasks: "{{ role_path }}/tasks/prometheus-postgres-exporter/inject_into_nginx_proxy.yml"