Hi, On Thu, Dec 18, 2025 at 06:13:53PM +0100, Nicolas Kovacs wrote: > Usually I manage all my installations (server and desktop) with Ansible. In > that case, I wonder if I should use Ansible's apt_repository module. Or is > it better to simply use Ansible's copy module to copy the configuration file > stubs over to the correct place, and then maybe the file module to erase the > obsolete /etc/apt/sources.list file.
I have managed apt repository files just with the file or template modules for many years and not had an issue. I call a handler to do the "apt update" when they change. I've no reason to believe that apt_repository or deb822_repository wouldn't work fine as well though, it's just that what I have already works for me. If rewriting the playbooks I'd be inclined to use deb822_repository if I only had to support Debian 13 and on, or apt_repository if needing to support older. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting

