You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行Ansible Playbook报unexpected parameter type错误如何解决

报错原因

该报错由非法的Ansible任务参数触发:你在删除镜像的任务中使用了错误的参数名ignore_error,Ansible中用于忽略任务执行错误的官方参数为复数形式的ignore_errors,缺失末尾的s会导致Ansible无法识别该参数,进而抛出参数类型不匹配的错误。

修复方案

将删除镜像任务里的ignore_error: yes修改为ignore_errors: yes即可解决问题。

修改后的正确任务片段如下:

- name: remove docker images from local host
  command: docker rmi docker-image tsvarma07/image:docker-image
  ignore_errors: yes

内容的提问来源于stack exchange,提问作者Sarath Varma T

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.06 04:39:01