Skip to content

Commit 277fea4

Browse files
committed
devconfig: enhance firstconfig on debian
There's a slew of stupid packages we need to disable to make CI more robust and deterministic at bringup. The unattended-upgrades is one of them, the other one is the systemd-networkd-wait-online.service which is just broken on debian trixie in the way we setup networking. Although there are devconfig tasks already to disable these, its not enough as devconfig playbook may not be run until later, and so we need to do this as early as possible. Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent c141802 commit 277fea4

File tree

1 file changed

+25
-1
lines changed
  • playbooks/roles/devconfig/tasks/install-deps/debian

1 file changed

+25
-1
lines changed

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
register: unattended_upgrade_status
55
ignore_errors: true
66
changed_when: false
7+
tags: firstconfig
78

89
- name: Set fact if unattended-upgrades is installed
910
set_fact:
@@ -23,6 +24,26 @@
2324
when:
2425
- kdevops_enable_guestfs|bool
2526
- unattended_upgrades_installed|bool
27+
tags: firstconfig
28+
29+
- name: Stop and disable unattended-upgrades related services
30+
become: yes
31+
become_flags: 'su - -c'
32+
become_method: sudo
33+
systemd:
34+
name: "{{ item }}"
35+
state: stopped
36+
enabled: no
37+
daemon_reload: yes
38+
loop:
39+
- unattended-upgrades
40+
- apt-daily.service
41+
- apt-daily.timer
42+
- apt-daily-upgrade.service
43+
- apt-daily-upgrade.timer
44+
- systemd-networkd-wait-online.service
45+
ignore_errors: yes
46+
tags: firstconfig
2647

2748
- name: Upgrade Packages
2849
become: yes
@@ -37,7 +58,7 @@
3758
delay: 60
3859
tags: firstconfig
3960

40-
- name: Remove unattended-upgrades package
61+
- name: Remove unattended-upgrades package in case upgrade installed it
4162
become: yes
4263
become_flags: 'su - -c'
4364
become_method: sudo
@@ -48,6 +69,7 @@
4869
retries: 20
4970
delay: 30
5071
until: removal_result is not failed
72+
tags: firstconfig
5173

5274
- name: Remove optional unattended-upgrades configuration files if they exist
5375
become: yes
@@ -62,6 +84,7 @@
6284
- /etc/apt/apt.conf.d/50unattended-upgrades
6385
- /etc/apt/apt.conf.d/52unattended-upgrades-local
6486
ignore_errors: yes
87+
tags: firstconfig
6588

6689
- name: Stop and disable unattended-upgrades related services
6790
become: yes
@@ -80,6 +103,7 @@
80103
- apt-daily-upgrade.timer
81104
- systemd-networkd-wait-online.service
82105
ignore_errors: yes
106+
tags: firstconfig
83107

84108
- name: Allow for distro source change / upgrade
85109
become: yes

0 commit comments

Comments
 (0)