- name: Create prometheus directory file: path: /root/prometheus state: directory - name: Copy prometheus config copy: src: "{{ role_path }}/prometheus.yml" dest: /root/prometheus/prometheus.yml - name: Copy prometheus systemd unit copy: src: "{{ role_path }}/container-prometheus.service" dest: /etc/systemd/system/container-prometheus.service notify: systemd daemon reload - name: Enable prometheus systemd unit systemd: name: container-prometheus.service enabled: true state: started