Fix condition check

This commit is contained in:
Jeffrey Serio 2025-01-22 22:25:21 -06:00
parent 05050ad632
commit fee8cb3dbd

View File

@ -14,8 +14,10 @@
- name: Check if backports are enabled in sources.list
ansible.builtin.lineinfile:
dest: /etc/apt/sources.list
line: "backports"
path: /etc/apt/sources.list
regex: "backports"
state: absent
changed_when: false
check_mode: true
register: backports
@ -26,7 +28,7 @@
upgrade: dist
when:
- ansible_distribution == 'Debian'
- backports.stat.exists == true
- backports.found == 1
- name: Check if reboot is required
ansible.builtin.stat: