Empty sources.list instead of removing
This commit is contained in:
parent
42cbede159
commit
a30d96f718
1 changed files with 4 additions and 2 deletions
|
@ -41,11 +41,13 @@
|
||||||
dest: "/etc/apt/sources.list.d/debian.sources"
|
dest: "/etc/apt/sources.list.d/debian.sources"
|
||||||
when: ansible_distribution_release == "bookworm"
|
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
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/apt/sources.list
|
path: /etc/apt/sources.list
|
||||||
|
regexp: ".*"
|
||||||
state: absent
|
state: absent
|
||||||
|
create: yes
|
||||||
when: ansible_distribution_release == "bookworm"
|
when: ansible_distribution_release == "bookworm"
|
||||||
|
|
||||||
- name: Update APT cache
|
- name: Update APT cache
|
||||||
|
|
Loading…
Reference in a new issue