1. ansible 10.0.0.1 -m raw -a "date" -u www
2.在ansible的主机配置文件中指定ssh_user
vi/etc/ansible/hosts
10.0.0.1 ansible_ssh_user=www
1. ansible 10.0.0.1 -m raw -a "date" -u www
2.在ansible的主机配置文件中指定ssh_user
vi/etc/ansible/hosts
10.0.0.1 ansible_ssh_user=www
转载于:https://www.cnblogs.com/hixiaowei/p/9744969.html