--- - name: prometheus installed package: name: prometheus - name: prometheus started and enabled service: name: prometheus state: started enabled: yes - name: promtheus template template: src: prometheus.yml.j2 dest: /etc/prometheus/prometheus.yml notify: restart prometheus