Check if ha_peer is set or exit.
This commit is contained in:
@@ -5,6 +5,17 @@
|
||||
# ha_role: backup → minimal pre-checks, upgrade proceeds normally
|
||||
# ha_role: primary → full CARP state verification, forced demotion
|
||||
|
||||
|
||||
# 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)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Backup node logic — runs on the backup before it upgrades
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user