Command Format
- absible <host or group list> [Options] // ansible all is the whole host
- -M path designation module
- -m using modules, the default is the command module
- -a module parameters or --args
- -i is the inventory or executable script file path
- -k using an interactive login password
- -e-defined variables
- -v For more information, -vvvv turn on debug mode
ansible all -m command -a "uptime" //如果没有做免密或者配置文件中有用户名和密码会报错
ansible all -m command -a "uptime" -k //不会报错,没有密码会让输入密码