Fix condition check
This commit is contained in:
parent
05050ad632
commit
fee8cb3dbd
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user