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

37 views
Skip to first unread message

zhong ming wu

unread,
Jun 27, 2014, 6:50:45 AM6/27/14
to ansible...@googlegroups.com
I had the following

- name: add my repository
  apt_repository: repo="deb http://repo.local.example.com/apt/u14 abcd main"


Then I changed it to

- name: add my repository
  apt_repository: repo="deb http://repo.local.example.com/apt/u14 xyz main"


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


Enrique Paredes

unread,
Jun 27, 2014, 10:44:29 AM6/27/14
to ansible...@googlegroups.com
if you only want to add a file in /apt/sour
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9e8a6422-321e-4a0f-a632-f9a7dd09076b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Enrique Paredes

unread,
Jun 27, 2014, 10:48:16 AM6/27/14
to ansible...@googlegroups.com
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)

On 27/06/2014, at 12:50, zhong ming wu <mr.z...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages