behavior of changing apt_repository is to add a new line and preserving the old data

I had the following

Then I changed it to

Ansible just add a new line to the existing file in

/etc/apt/sources.list.d/

Is there any case where this behavior makes sense? In my case, this breaks things because the server with ‘abcd’ distribution does not exist any more and ‘apt-get update’ fails

Z M Wu

if you only want to add a file in /apt/sour

if you want to add a file in apt/sources.d use the copy module instead.

I don’t know any other uses to add-apt-repository than adding ppas.

(sorry for the trucated previous message)