Files
2026-03-29 09:08:01 +08:00

17 lines
731 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 可复用:仅在进入门禁分支时输出一行 [GATE] 并 end_play。
# 调用方在「本 task」上写 when:;条件为假时整段 include 被跳过,不会出现 debug/meta 两条 skipping。
# 必填verify_gate_message字符串须含 [GATE] 供 verify.sh 解析)
- name: Assert verify_gate_message for gate-debug-end-play
ansible.builtin.assert:
that:
- verify_gate_message is defined
- (verify_gate_message | string | trim | length) > 0
fail_msg: "verify_common gate-debug-end-play需设置 verify_gate_message"
- name: Emit gated message (verify_common)
ansible.builtin.debug:
msg: "{{ verify_gate_message }}"
- name: End play after gate (verify_common)
meta: end_play