--- - name: "Restart caddy" ansible.builtin.service: name: caddy state: restarted when: ansible_service_mgr == "systemd" - name: "Reload systemd" ansible.builtin.systemd: daemon_reload: true when: ansible_service_mgr == "systemd"