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
|
- name: Check if backports are enabled in sources.list
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
dest: /etc/apt/sources.list
|
path: /etc/apt/sources.list
|
||||||
line: "backports"
|
regex: "backports"
|
||||||
|
state: absent
|
||||||
|
changed_when: false
|
||||||
check_mode: true
|
check_mode: true
|
||||||
register: backports
|
register: backports
|
||||||
|
|
||||||
@ -26,7 +28,7 @@
|
|||||||
upgrade: dist
|
upgrade: dist
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == 'Debian'
|
- ansible_distribution == 'Debian'
|
||||||
- backports.stat.exists == true
|
- backports.found == 1
|
||||||
|
|
||||||
- name: Check if reboot is required
|
- name: Check if reboot is required
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user