Could not match supplied host pattern, ignoring: 192.168.0.101
[root@ansible ansible]# ansible 192.168.0.101 -m ping
[WARNING]: Could not match supplied host pattern, ignoring: 192.168.0.101
[WARNING]: No hosts matched, nothing to do
ansible是一个严格按照主机清单操作主机的软件,上面的报错是因为你没有在 /etc/ansible/hosts文件中添加 192.168.0.101 所有才会报错。
正确操作: