fix: loop_var under loop_control in drain.yml and restore.yml

This commit is contained in:
Semaphore
2026-03-14 14:25:24 -07:00
parent e771f6d9a9
commit a19fe2ce5d
8 changed files with 50 additions and 11 deletions

View File

@@ -0,0 +1,42 @@
---
# =============================================================================
# proxmox_upgrade.yml
# =============================================================================
# Rolling Proxmox cluster upgrade playbook.
# Runs on the first node in upgrade_order — all other nodes are handled
# via API calls and delegate_to from within the role.
#
# Usage:
# ansible-playbook playbooks/proxmox_upgrade.yml \
# -i inventories/client_local_eng/hypervisor_hosts.yml
#
# Override migration behaviour:
# -e migration_bulk=true
# -e live_migrate_fallback=skip
# -e migration_restore=true
#
# Dry run (check mode — no changes):
# --check
# =============================================================================
- name: Proxmox Rolling Upgrade
hosts: proxmox_cluster
gather_facts: true
serial: 1
run_once: true
pre_tasks:
- name: Confirm upgrade_order is defined
ansible.builtin.fail:
msg: "upgrade_order must be defined in hypervisor_hosts.yml"
when: upgrade_order is not defined or upgrade_order | length == 0
- name: Log upgrade targets
ansible.builtin.debug:
msg: >-
Proxmox upgrade starting for {{ client_name }} ({{ client_id }})
Nodes: {{ upgrade_order | join(', ') }}
API: https://{{ api_host }}:{{ api_port }}
roles:
- proxmox_upgrade