From 734bbf031de0464d4b5daa5452c1b6a2e0ac5b3c Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 2 May 2026 22:49:52 -0500 Subject: [PATCH] Safer removal of debian CDROM from apt sources.list Signed-off-by: Jason Rothstein --- tasks/Debian-default.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/Debian-default.yml b/tasks/Debian-default.yml index 2d28f1e..a0f5696 100644 --- a/tasks/Debian-default.yml +++ b/tasks/Debian-default.yml @@ -1,6 +1,8 @@ --- # tasks file for ensure_ansible_prereq - name: 'repository changes' - ansible.builtin.apt_repository: - repo: 'deb cdrom:*' + ansible.builtin.lineinfile: + path: '/etc/apt/sources.list' state: 'absent' + regexp: 'deb cdrom:' +