This commit is contained in:
2026-09-23 15:28:59 +03:00
parent b2a0316b8b
commit bf08cc0065

View File

@@ -2660,7 +2660,7 @@
sshpass -f "{{ dev2_passfile_used }}" ssh {{ ssh_opts_common }} \ sshpass -f "{{ dev2_passfile_used }}" ssh {{ ssh_opts_common }} \
-o ConnectTimeout={{ ssh_timeout }} \ -o ConnectTimeout={{ ssh_timeout }} \
-p "$PORT" "{{ dev2_ssh_user }}@127.0.0.1" \ -p "$PORT" "{{ dev2_ssh_user }}@127.0.0.1" \
"cat /tmp/config.json 2>/dev/null | grep -i block -A2 | grep enab | head -n1 || true" "grep -i block -A2 /tmp/config.json 2>/dev/null | grep enab | head -n1 | grep -Eo 'true|false' | head -n1 || true"
exit 0 exit 0
fi fi
@@ -2669,7 +2669,7 @@
-o StrictHostKeyChecking=no -o PubkeyAuthentication=no \ -o StrictHostKeyChecking=no -o PubkeyAuthentication=no \
-o ConnectTimeout=15 \ -o ConnectTimeout=15 \
"{{ dev2_ssh_user }}@{{ lldp_dev2_ip }}" \ "{{ dev2_ssh_user }}@{{ lldp_dev2_ip }}" \
"cat /tmp/config.json 2>/dev/null | grep -i block -A2 | grep enab | head -n1 || true" "grep -i block -A2 /tmp/config.json 2>/dev/null | grep enab | head -n1 | grep -Eo 'true|false' | head -n1 || true"
exit 0 exit 0
fi fi
@@ -2682,7 +2682,7 @@
-o StrictHostKeyChecking=no -o PubkeyAuthentication=no \ -o StrictHostKeyChecking=no -o PubkeyAuthentication=no \
-o ConnectTimeout={{ ssh_timeout }} \ -o ConnectTimeout={{ ssh_timeout }} \
'{{ dev2_ssh_user }}@\[${IP6}%{{ dev1_iface }}\]' \ '{{ dev2_ssh_user }}@\[${IP6}%{{ dev1_iface }}\]' \
\"cat /tmp/config.json 2>/dev/null | grep -i block -A2 | grep enab | head -n1 || true\"" \"grep -i block -A2 /tmp/config.json 2>/dev/null | grep enab | head -n1 | grep -Eo 'true|false' | head -n1 || true\""
exit 0 exit 0
fi fi
@@ -2700,13 +2700,11 @@
payredirect_raw_clean: "{{ dev2_payredirect_raw.stdout | default('') | trim | lower }}" payredirect_raw_clean: "{{ dev2_payredirect_raw.stdout | default('') | trim | lower }}"
set_fact: set_fact:
payredirect_value: >- payredirect_value: >-
{%- if ('\"enabled\"' in payredirect_raw_clean) and ('true' in payredirect_raw_clean) -%} {{
true payredirect_raw_clean
{%- elif ('\"enabled\"' in payredirect_raw_clean) and ('false' in payredirect_raw_clean) -%} if payredirect_raw_clean in ['true', 'false']
false else 'na'
{%- else -%} }}
na
{%- endif -%}
changed_when: false changed_when: false
- name: Dev2 | payredirect debug - name: Dev2 | payredirect debug