Check if ha_peer

This commit is contained in:
2026-04-29 13:11:30 -07:00
parent 95e2dcafe8
commit 4d63613d41

View File

@@ -2,6 +2,16 @@
# Handles CARP/HA post-upgrade logic: restore and verification. # Handles CARP/HA post-upgrade logic: restore and verification.
# Only runs on primary after successful upgrade. # Only runs on primary after successful upgrade.
# Exit early if HA not needed
- name: "[CARP] Exit - No HA configured"
ansible.builtin.meta: end_play
when: ha_peer is not defined or ha_peer | length == 0
# Exit early if no upgrade available
- name: "[CARP] Exit - No upgrade available for this host"
ansible.builtin.meta: end_play
when: not (upgrade_available | default(false) | bool)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Post-upgrade: restore CARP on primary and verify state # Post-upgrade: restore CARP on primary and verify state
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------