commited current state (new functions, may not work by now)
This commit is contained in:
20
playbooks/os-major-upgrade.yml
Normal file
20
playbooks/os-major-upgrade.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
- 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"
|
||||
Reference in New Issue
Block a user