- name: Create Groups become: true ansible.builtin.group: name: prometheus state: present - name: Install Prometheus become: true become_user: root ansible.builtin.apt: name: prometheus state: latest - name: Install config become: true become_user: root ansible.builtin.template: src: prometheus.yml.j2 dest: "/etc/prometheus/prometheus.yml" - name: Start service become: true become_user: root ansible.builtin.systemd_service: name: prometheus enabled: true state: restarted