You are talking about yum but uses the apt module, that should be yum I
presume.
You have all the modules here
https://docs.ansible.com/ansible/list_of_all_modules.html
and if you search for yum you'll find
yum_repository - Add or remove YUM repositories
https://docs.ansible.com/ansible/yum_repository_module.html
You can also find the documentation on the command line like this.
$ ansible-doc --list|grep yum
yum Manages packages with the `yum'
package manager
yum_repository Add or remove YUM repositories
To get the documentation on the yum_repository module
$ ansible-doc yum_repository
--
Kai Stian Olstad