--- - name: Create /etc/grafana and /var/lib/grafana ansible.builtin.file: path: "{{ item }}" state: directory owner: "{{ grafana_uid }}" group: "{{ grafana_uid }}" recurse: true with_items: - /etc/grafana - /var/lib/grafana - name: Include_tasks systemd.yml ansible.builtin.include_tasks: systemd.yml - name: Start the grafana-server service ansible.builtin.systemd: name: grafana-server state: started enabled: true daemon_reload: true failed_when: false