- name: Validate variables assert: that: - temp_dir is defined and temp_dir | length > 0 - artifact_name is defined and artifact_name | length > 0 fail_msg: "Thiếu hoặc rỗng biến cần thiết để cleanup_temp_artifact!" # Xóa file tạm - name: Clean up temporary files win_file: path: "{{ temp_dir }}\\{{ artifact_name }}" state: absent