scnzzh@ZUBT:~$ ansible -i zzh-inventory all --list-hosts | grep WARNING | wc -l [WARNING]: * Failed to parse /home/scnzzh/zzh-inventory with yaml plugin: Syntax Error while loading YAML. did not find expected <document start> The error appears to be in ‘/home/scnzzh/zzh-inventory‘: line 2, column 1, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: [zservers] zubt ^ here [WARNING]: * Failed to parse /home/scnzzh/zzh-inventory with ini plugin: host range must have begin <= end [WARNING]: Unable to parse /home/scnzzh/zzh-inventory as an inventory source [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all‘ 0 scnzzh@ZUBT:~$ ansible -i zzh-inventory all --list-hosts 2>&1 | grep WARNING | wc -l 5
原文:https://www.cnblogs.com/zhangzhihui/p/14069326.html