Files
ansible/update.yml
2025-10-28 01:10:58 +00:00

29 lines
892 B
YAML

---
- name: Update and upgrade all servers
hosts: all
become: yes
become_method: sudo
become_user: root
tasks:
- name: Update apt cache (allow release info changes)
apt:
update_cache: yes
cache_valid_time: 3600
force_apt_get: yes
# Use apt options to allow codename/origin/suite changes safely
extra_args: >
-o Acquire::AllowReleaseInfoChange::Suite=true
-o Acquire::AllowReleaseInfoChange::Codename=true
-o Acquire::AllowReleaseInfoChange::Origin=true
- name: Upgrade all packages (allow release info changes)
apt:
upgrade: dist
autoremove: yes
autoclean: yes
force_apt_get: yes
extra_args: >
-o Acquire::AllowReleaseInfoChange::Suite=true
-o Acquire::AllowReleaseInfoChange::Codename=true
-o Acquire::AllowReleaseInfoChange::Origin=true