refactor: proxmox_upgrade use inline community.proxmox for API calls.
This commit is contained in:
@@ -1,22 +1,19 @@
|
||||
---
|
||||
# =============================================================================
|
||||
# proxmox_upgrade.yml
|
||||
# proxmox_upgrade.yml — Rolling Proxmox cluster upgrade
|
||||
# =============================================================================
|
||||
# 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.
|
||||
# Requires: community.proxmox collection + proxmoxer>=2.0, requests on Semaphore
|
||||
# ansible-galaxy collection install community.proxmox
|
||||
# pip install proxmoxer requests --break-system-packages
|
||||
#
|
||||
# Usage:
|
||||
# ansible-playbook playbooks/proxmox_upgrade.yml \
|
||||
# -i inventories/client_local_eng/hypervisor_hosts.yml
|
||||
#
|
||||
# Override migration behaviour:
|
||||
# Overrides:
|
||||
# -e migration_bulk=true
|
||||
# -e live_migrate_fallback=skip
|
||||
# -e migration_restore=true
|
||||
#
|
||||
# Dry run (check mode — no changes):
|
||||
# --check
|
||||
# =============================================================================
|
||||
|
||||
- name: Proxmox Rolling Upgrade
|
||||
@@ -26,15 +23,15 @@
|
||||
run_once: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Confirm upgrade_order is defined
|
||||
- name: Validate 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
|
||||
- name: Log upgrade plan
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
Proxmox upgrade starting for {{ client_name }} ({{ client_id }})
|
||||
Proxmox upgrade: {{ client_name }} ({{ client_id }})
|
||||
Nodes: {{ upgrade_order | join(', ') }}
|
||||
API: https://{{ api_host }}:{{ api_port }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user