diff --git a/tasks/main.yml b/tasks/main.yml index 94b4443..b5f262d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,15 +6,15 @@ name: "{{ pilab_prometheus_pkgs }}" state: latest - - vars: - image: "{{ pilab_prometheus_engine_image }}" - ports: - - src: "{{ pilab_prometheus_port_prometheus }}" - dest: 9090 - volumes: - - tmpl: prometheus.yml - src: "{{ pilab_prometheus_path_config }}/prometheus.yml" - dest: /etc/prometheus/prometheus.yml + - loop: + - image: "{{ pilab_prometheus_engine_image }}" + ports: + - src: "{{ pilab_prometheus_port_prometheus }}" + dest: 9090 + volumes: + - tmpl: "{{ role_path }}/templates/prometheus.yml" + src: "{{ pilab_prometheus_path_config }}/prometheus.yml" + dest: /etc/prometheus/prometheus.yml ansible.builtin.include_role: name: pilab-role-common tasks_from: add-service