Allow stopping ubuntu unattended-upgrades (#12174)

Signed-off-by: Ekko Tu <lihai.tu@daocloud.io>
This commit is contained in:
Ekko
2025-05-20 16:07:16 +08:00
committed by GitHub
parent 019cf2ab42
commit 6c5c45b328
2 changed files with 10 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ use_oracle_public_repo: true
## Ubuntu specific variables
# Disable unattended-upgrades for Linux kernel and all packages start with linux- on Ubuntu
ubuntu_kernel_unattended_upgrades_disabled: false
# Stop unattended-upgrades if it is currently running on Ubuntu
ubuntu_stop_unattended_upgrades: false
fedora_coreos_packages:
- python

View File

@@ -19,3 +19,11 @@
when:
- ubuntu_kernel_unattended_upgrades_disabled
- unattended_upgrades_file_stat.stat.exists
- name: Stop unattended-upgrades service
service:
name: unattended-upgrades
state: stopped
enabled: false
become: true
when: ubuntu_stop_unattended_upgrades