Output of dnf repolist

Not as a remote API, no — it’s a library, not a service. You’d need something to run.

I do wonder if maybe @td211’s suggestion of looking directly at the files in /etc/yum.repos.d is going to be your best bet in practice. Theoretically, a config could put some repos in a different place, but I have never actually ever seen that happen. Parse the files and look at the values for enabled.

1 Like

If you need to manage Fedora host dnf repos remotely and generically, there’s the Ansible yum_repository module: