Support disable unattended-upgrades for Linux kernel and all packages start with linux- on Ubuntu (#11296)

Signed-off-by: tu1h <lihai.tu@daocloud.io>
pull/11258/head
Lihai Tu 2024-06-26 17:30:27 +08:00 committed by GitHub
parent 0c84175e3b
commit 817c61695d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -11,6 +11,10 @@ coreos_locksmithd_disable: false
# Install public repo on Oracle Linux
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
fedora_coreos_packages:
- python
- python3-libselinux

View File

@ -62,3 +62,14 @@
- '"changed its" in bootstrap_update_apt_result.stdout'
- '"value from" in bootstrap_update_apt_result.stdout'
ignore_errors: true
- name: Disable kernel unattended-upgrades
lineinfile:
path: /etc/apt/apt.conf.d/50unattended-upgrades
insertafter: "Unattended-Upgrade::Package-Blacklist"
line: '"linux-";'
state: present
become: true
when:
- os_release_dict['ID'] == 'ubuntu'
- ubuntu_kernel_unattended_upgrades_disabled