# - name: "grafana-prometheus | import grafana provisioned datasources" # synchronize: # src: "{{ grafana_provisioned_datasources_path }}" # dest: /opt/docker-compose/grafana-prometheus/ # when: grafana_provisioned_datasources_path is defined # notify: "grafana-prometheus-restart" # # - name: "grafana-prometheus | import grafana provisioned dashboards" # synchronize: # src: "{{ grafana_provisioned_dashboards_path }}" # dest: /opt/docker-compose/grafana-prometheus/ # when: grafana_provisioned_datasources_path is defined # notify: "grafana-prometheus-restart" - name: "grafana-prometheus | create grafana provisioning directories" file: path: "/opt/docker-compose/grafana-prometheus/{{ item }}" state: directory owner: '1000' group: '1000' mode: '0755' loop: - datasources - dashboards when: grafana_provisioned_datasources_path is not defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana provisioned datasources conf" template: src: dashboards/datasources.yaml.j2 dest: /opt/docker-compose/grafana-prometheus/datasources/datasources.yaml owner: '1000' group: '1000' mode: '0750' when: grafana_provisioned_datasources_path is not defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana provisioned dashboards conf" template: src: dashboards/dashboard.yaml.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/dashboard.yaml owner: '1000' group: '1000' mode: '0750' when: grafana_provisioned_dashboards_path is not defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana apache dashboard" template: src: dashboards/apache.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/apache.json owner: '1000' group: '1000' mode: '0750' when: prometheus_apache_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana cloudflare dashboard" template: src: dashboards/cloudflare.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/cloudflare.json owner: '1000' group: '1000' mode: '0750' when: prometheus_cloudflare_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana docker dashboard" template: src: dashboards/docker.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/docker.json owner: '1000' group: '1000' mode: '0750' when: prometheus_docker_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana docker dashboard" template: src: dashboards/docker.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/docker.json owner: '1000' group: '1000' mode: '0750' when: prometheus_cadvisor_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana opensearch dashboard" template: src: dashboards/opensearch.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/opensearch.json owner: '1000' group: '1000' mode: '0750' when: prometheus_opensearch_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana haproxy dashboard" template: src: dashboards/haproxy.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/haproxy.json owner: '1000' group: '1000' mode: '0750' when: prometheus_haproxy_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana memcached dashboard" template: src: dashboards/memcached.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/memcached.json owner: '1000' group: '1000' mode: '0750' when: prometheus_memcached_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana mysqld dashboard" template: src: dashboards/mysqld.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/mysqld.json owner: '1000' group: '1000' mode: '0750' when: prometheus_mysqld_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana network dashboard" template: src: dashboards/network.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/network.json owner: '1000' group: '1000' mode: '0750' when: prometheus_node_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana node-exporter dashboard" template: src: dashboards/node-exporter.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/node-exporter.json owner: '1000' group: '1000' mode: '0750' when: prometheus_node_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana opcache dashboard" template: src: dashboards/opcache.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/opcache.json owner: '1000' group: '1000' mode: '0750' when: prometheus_opcache_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana overview dashboard" template: src: dashboards/overview.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json owner: '1000' group: '1000' mode: '0750' when: > prometheus_node_exporter_targets is defined and prometheus_cloudflare_exporter_targets is not defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana overview-cf dashboard" template: src: dashboards/overview-cf.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json owner: '1000' group: '1000' mode: '0750' when: > prometheus_node_exporter_targets is defined and prometheus_cloudflare_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana plateform-overview dashboard" template: src: dashboards/plateform-overview.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json owner: '1000' group: '1000' mode: '0750' when: > prometheus_node_exporter_targets is defined and prometheus_cloudflare_exporter_targets is not defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana plateform-overview-cf dashboard" template: src: dashboards/plateform-overview-cf.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json owner: '1000' group: '1000' mode: '0750' when: > prometheus_node_exporter_targets is defined and prometheus_cloudflare_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana phpfpm dashboard" template: src: dashboards/phpfpm.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/phpfpm.json owner: '1000' group: '1000' mode: '0750' when: prometheus_phpfpm_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana proxmox dashboard" template: src: dashboards/proxmox.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/proxmox.json owner: '1000' group: '1000' mode: '0750' when: prometheus_proxmox_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana redis dashboard" template: src: dashboards/redis.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/redis.json owner: '1000' group: '1000' mode: '0750' when: prometheus_redis_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana varnish dashboard" template: src: dashboards/varnish.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/varnish.json owner: '1000' group: '1000' mode: '0750' when: prometheus_varnish_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana gitlab dashboard" template: src: dashboards/gitlab.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/gitlab.json owner: '1000' group: '1000' mode: '0750' when: prometheus_gitlab_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana postgresql dashboard" template: src: dashboards/postgresql.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/postgresql.json owner: '1000' group: '1000' mode: '0750' when: prometheus_postgres_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana kong dashboard" template: src: dashboards/kong.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/kong.json owner: '1000' group: '1000' mode: '0750' when: prometheus_kong_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana nginx dashboard" template: src: dashboards/nginx.json.j2 dest: /opt/docker-compose/grafana-prometheus/dashboards/nginx.json owner: '1000' group: '1000' mode: '0750' when: prometheus_nginx_exporter_targets is defined notify: "grafana-prometheus-restart"