安裝
yum -y install ansible
ansible --version
配置
ssh-copy-id -i root@${IP}
vim /etc/ansible/hosts
[dbservers]
${IP1}
${IP2}
使用
ansible -m command -a “hostname” ‘dbservers’
yum -y install ansible
ansible --version
ssh-copy-id -i root@${IP}
vim /etc/ansible/hosts
[dbservers]
${IP1}
${IP2}
ansible -m command -a “hostname” ‘dbservers’