From fa678c19c64c688d36b9997efa6271e71cae2841 Mon Sep 17 00:00:00 2001 From: "Ben D." Date: Wed, 29 Apr 2026 12:43:51 -0700 Subject: [PATCH] Trying to stop carp on non ha_peer systems --- roles/pfsense_upgrade/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/pfsense_upgrade/tasks/main.yml b/roles/pfsense_upgrade/tasks/main.yml index 62117b9..75554dc 100644 --- a/roles/pfsense_upgrade/tasks/main.yml +++ b/roles/pfsense_upgrade/tasks/main.yml @@ -19,6 +19,14 @@ tags: [always, backup] when: perform_upgrade | bool +- name: DEBUG - Check CARP conditions + ansible.builtin.debug: + msg: + - "ha_peer is defined: {{ ha_peer is defined }}" + - "ha_peer value: {{ ha_peer | default('UNDEFINED') }}" + - "ha_peer length: {{ ha_peer | length if ha_peer is defined else 'N/A' }}" + when: always + # CARP pre-upgrade (demotion) - name: Include CARP pre-upgrade logic ansible.builtin.import_tasks: carp_pre.yml @@ -26,6 +34,7 @@ when: - ha_peer is defined - ha_peer | length > 0 + - upgrade_available | bool # Also only if upgrade is available # Upgrade execution - name: Include upgrade execution @@ -43,6 +52,7 @@ - ha_peer is defined - ha_peer | length > 0 - perform_upgrade | bool + - upgrade_available | bool # Also only if upgrade is available # Verification - name: Include post-upgrade verification