- yum -y install ansible
- ansible --version
- mkdir /etc/ansible
- touch /etc/ansible/hosts
[example]
www.example.com
- ansible example -m ping -u [username]
- ansible example -a "free -m" -u [username]
[example]
www.example.com
转载于:https://www.cnblogs.com/guxiaobei/p/8250988.html