On Mon, Feb 22, 2021 at 03:10:17PM +0800, Wu Fengguang wrote:
- # {"changed": false, "cmd": "csf -v", "msg": "[Errno 2] No such file or directory: b'csf': b'csf'", "rc": 2}
- when /(No such file or directory: b'.+')/
- output_error $1
我估计这样匹配会漏掉一些问题。 包括其它的很多when pattern,貌似这样根据输出结果case by case做解析,很难把各种情况覆盖全。
建议去看一下ansible源代码,以便更全面和彻底的设计这里的解析逻辑.
Ok. git it.
Thanks, Chenglong
Thanks, Fengguang