Files
operating-automation/playbooks/os-major-upgrade.yml
2025-10-08 09:32:02 +02:00

20 lines
851 B
YAML

- hosts: all
vars:
os_update_major_version: true # Can either be true or false | To toggle if systems need to be upgraded to newer codename
os_update_version_codename: "trixie" # Change to switch major release (e.g. bookworm or trixie) | Used for jinja2 Template fill in as it determines the current codename of system where ansible is run on
tasks:
- name: Verify if system is Debian
debug:
msg: "This playbook is running on a Debian system."
when: ansible_os_family == "Debian"
- name: Stop playbook if system is not Debian
fail:
msg: "This playbook only supports Debian."
when: ansible_os_family != "Debian"
- name: Include OS update role
ansible.builtin.include_role:
name: os-updates
tasks_from: update_major_version
when: ansible_os_family == "Debian"