diff --git a/files/ansible-playbooks/update-indoor5.yml b/files/ansible-playbooks/update-indoor5.yml index 0358aef..592b6a3 100644 --- a/files/ansible-playbooks/update-indoor5.yml +++ b/files/ansible-playbooks/update-indoor5.yml @@ -645,7 +645,8 @@ - name: Append connection method decision to journal ansible.builtin.set_fact: - _journal: "{{ _journal + [ 'Connection method for DEV2: ' ~ dev2_conn_method ~ (dev2_conn_method == 'direct_lldp' | ternary(' (' ~ (dev2_ssh_host | default('')) ~ ')','')) ] }}" + _journal: "{{ _journal + [ 'Connection method for DEV2: ' ~ dev2_conn_method ~ (((dev2_conn_method == 'direct_lldp') | ternary(' (' ~ (dev2_ssh_host | default('')) ~ ')',''))) ] }}" + # ---- Apply hostname policy: soft-fail for other ikejaNNNN, warn+customfield for "weird" names ---- - name: Soft-block if DEV2 hostname is another ikeja (probable wrong indoor) @@ -1670,7 +1671,8 @@ state: absent ignore_errors: true - - name: Remove temporary IP on DEV1 (tolerate 'Cannot assign requested address') + - name: Remove temporary IP on DEV1 (tolerate 'Cannot assign requested address' and 'Address not available') + when: dev2_conn_method | default('') == "tunnel" ansible.builtin.raw: > {{ pathprefix }} ip a del {{ dev2_side_ip }} dev {{ dev1_iface }} @@ -1680,6 +1682,11 @@ del_ip.rc != 0 and ('Cannot assign requested address' not in (del_ip.stdout | default(''))) and ('Cannot assign requested address' not in (del_ip.stderr | default(''))) + and ('Address not available' not in (del_ip.stdout | default(''))) + and ('Address not available' not in (del_ip.stderr | default(''))) + and ('RTNETLINK answers: Address not available' not in (del_ip.stdout | default(''))) + and ('RTNETLINK answers: Address not available' not in (del_ip.stderr | default(''))) + - name: Debug temp IP removal result ansible.builtin.debug: