Browse Source

Allow stopping ubuntu unattended-upgrades (#12174)

Signed-off-by: Ekko Tu <lihai.tu@daocloud.io>
pull/12229/head
Ekko 4 months ago
committed by GitHub
parent
commit
6c5c45b328
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions
  1. 2
      roles/bootstrap_os/defaults/main.yml
  2. 8
      roles/bootstrap_os/tasks/ubuntu.yml

2
roles/bootstrap_os/defaults/main.yml

@ -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

8
roles/bootstrap_os/tasks/ubuntu.yml

@ -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
Loading…
Cancel
Save