Empty sources.list instead of removing

This commit is contained in:
Anthony Rose 2023-02-21 21:03:35 +00:00
parent 42cbede159
commit a30d96f718

View file

@ -41,11 +41,13 @@
dest: "/etc/apt/sources.list.d/debian.sources"
when: ansible_distribution_release == "bookworm"
- name: Remove /etc/apt/sources.list for Debian 12
- name: Empty /etc/apt/sources.list for Debian 12
become: true
ansible.builtin.file:
ansible.builtin.lineinfile:
path: /etc/apt/sources.list
regexp: ".*"
state: absent
create: yes
when: ansible_distribution_release == "bookworm"
- name: Update APT cache