diff --git a/tasks/repos.yml b/tasks/repos.yml index 37da939..7033daa 100644 --- a/tasks/repos.yml +++ b/tasks/repos.yml @@ -1,11 +1,11 @@ --- -- name: repos | Remove enterprise repo files (all known locations) - ansible.builtin.file: - path: "{{ item }}" - state: absent - loop: - - /etc/apt/sources.list.d/pve-enterprise.list - - /etc/apt/sources.list.d/ceph.list +- name: Comment out Proxmox enterprise repo lines + ansible.builtin.replace: + path: /etc/apt/sources.list.d/pve-enterprise.list + regexp: '^(deb\s+)' + replace: '# \1' + when: ansible.builtin.stat(path='/etc/apt/sources.list.d/pve-enterprise.list').stat.exists + notify: apt update - name: repos | Enable Proxmox no-subscription repo ansible.builtin.copy: