yum install epel-release
yum install ansible
ansible 192.168.15.169 -m ping -k
ansible all -u gao -k -m command -a 'ls /root' -b root -K
修改组
visudo
加入组
usermod -aG wheel wang
visudo加颜色
echo export EDITOR=vim > /etc/profile.d/env.sh
source /etc/profile.d/env.sh
ansible 安装服务
ansible all -m yum -a 'name=vsftpd'
安装多个服务逗号隔开
ansible all -m yum -a 'name=vsftpd,httpd,vim'
ansible 卸载服务
ansible all -m shell -a 'rmp -q vsftpd'