部署和使用 ansible
yum install epel-release -y
yum install ansible libselinux-python -y(服务端)
yum install libselinux-python -y(客户端)
cp /etc/ansible/hosts{,.ori}
ansible 主机 -m 模块 -a '命令'
ansible ceshi -m command -a 'hostname' [-k -u root]
ansible IP -m command -a 'hostname' [-k -u root]
ansible all -m command -a 'hostname' [-k -u root]