福州网站建设方案优化,东莞著名网站建设企业,南京网站制作价格,wordpress主题The7一、ansible简介 
需要在一台机器上搭建ansible环境#xff0c;且配置目的ip的密码#xff0c;通道没有问题即可下发命令 
使用的通道是ssh#xff08;端口#xff1a;36000#xff09; 
二、搭建细节 
1、安装ansible 
yum install -y ansible  
2、把目的ip密码写到配置…一、ansible简介 
需要在一台机器上搭建ansible环境且配置目的ip的密码通道没有问题即可下发命令 
使用的通道是ssh端口36000 
二、搭建细节 
1、安装ansible 
yum install -y ansible  
2、把目的ip密码写到配置文件中 
vim /etc/ansible/hosts 
配置文件例如 
[outside_muji]
你的IP	ansible_ssh_userroot ansible_ssh_port36000  ansible_ssh_pass你的密码
你的IP	ansible_ssh_userroot ansible_ssh_port36000  ansible_ssh_pass你的密码3、修改免密登录 
vim /etc/ansible/ansible.cfg
在文件中进行搜索定位
:/host_key_checking修改前
# uncomment this to disable SSH key host checking
#host_key_checking  False
修改后
# uncomment this to disable SSH key host checking
host_key_checking  False4、执行你想批量执行的命令 
ansible outside_muji -m shell -a date