https://discourse.gitea.io/t/unattended-gitea-installation-from-the-cli/3373
@misc mentioned this Gitea ansible role that may do the right thing.
https://testgit.home.ephaone.org/misc/ansible-role-gitea