[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Manage Debian repositories using Ansible



Le 18/12/2025 à 18:13, Nicolas Kovacs a écrit :
Hi,

I'm rediscovering Debian after a (very) long break.

I understand there's a new repository definition standard, according to the example in /usr/share/doc/apt/examples.

If I understand this right, I can just copy the example file over to /etc/apt/sources.list.d and then rename or remove the "classic" /etc/apt/sources.list file created by the installer. (Correct me if I'm wrong.)

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.

Any suggestions ?

Niki

Ypu may use the ansible.builtin.deb822_repository module



Reply to: