提前预警:文档排版乱,还望诸位海涵。本文自用
ansible官方文档 传送门
命令本意是,ansible在raleigh组下属所有设备中执行shell命令,命令内容是echo $TERM
。
$ ansible raleigh -m ansible.builtin.shell -a 'echo $TERM'
实际执行时,出现如下报错信息。根据官方代码issu查询发现。是ansible.builtin.shell这个完整的名字导致。
ERROR! this task 'ansible.builtin.shell' has extra params, which is only allowed in th