Skip to content

Commit 4680fce

Browse files
committed
devconfig: ensure unattended-upgrades is not installed on debian
We already remove the package on debian bringups when downloading a an official but-not-guestfs-official (and so debian custom) image to build our base images for our guests. Now that we have that stop-gap measure, be sure we just fail if the package happens to be installed, and complain to the user about it. We can easily fix this with just two command so recommend that. Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 5f51fd2 commit 4680fce

File tree

1 file changed

+22
-0
lines changed
  • playbooks/roles/devconfig/tasks/install-deps/debian

1 file changed

+22
-0
lines changed

playbooks/roles/devconfig/tasks/install-deps/debian/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
---
2+
- name: Check if unattended-upgrades is installed
3+
command: dpkg-query -W -f='${Status}' unattended-upgrades
4+
register: unattended_upgrade_status
5+
ignore_errors: true
6+
changed_when: false
7+
8+
- name: Set fact if unattended-upgrades is installed
9+
set_fact:
10+
unattended_upgrades_installed: "{{ 'install ok installed' in unattended_upgrade_status.stdout }}"
11+
12+
- name: Verify unattended-upgrades is not installed
13+
fail:
14+
msg: |
15+
The unattended-upgrades package is installed on the base image, this
16+
can cause tons of issues with CIs. Fix this by running the following
17+
commands:
18+
19+
make cleancache
20+
make bringup
21+
when:
22+
- unattended_upgrades_installed|bool
23+
224
- name: Upgrade Packages
325
become: yes
426
become_method: sudo

0 commit comments

Comments
 (0)