- name: Install packages package: name: - prometheus - name: Create directory for prometheus configs file: path: /etc/prometheus/conf.d state: directory - name: Configure prometheus copy: dest: /etc/prometheus/ src: prometheus.yml notify: reload prometheus - name: Enable prometheus service service: name: prometheus enabled: true state: started