定义主机组用户和密码 [webservers] ansible[01:04] ansible_ssh_user='root' ansible_ssh_pass='AAbb0101' [root@ftp:/root] > ansible webservers -m ping -o ansible01 | SUCCESS => {"changed": false, "ping": "pong"} ansible04 | SUCCESS => {"changed": false, "ping": "pong"} ansible02 | SUCCESS => {"changed": false, "ping": "pong"} ansible03 | SUCCESS => {"changed": false, "ping": "pong"}