首页 > 其他 > 详细

ansible 安装和使用

时间:2017-08-25 11:59:39      阅读:271      评论:0      收藏:0      [点我收藏+]

## 安装epel 源:

1 rpm -ivh  https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

## 安装ansible 服务端:

1 yum install ansible -y

## ssh-keygen  生成秘钥文件:

1 ssh-keygen -t rsa
2      一路回车......
3 cd /root/.ssh/ && ll ./*

## 配置ansible  的hosts 文件:

1 vim /etc/ansible/hosts
2 [web_group]
3 192.168.8.101

## 添加客户端使用ssh 方式:

1 ssh-copy-id -i /root/.ssh/id_rsa.pub 192.168.8.101

##  测试所有连接的客户端:

1 ansible all -a who

 

 

 

 

转自:http://www.cnblogs.com/zhenxing06/p/5865539.html

 

ansible 安装和使用

原文:http://www.cnblogs.com/pyshell/p/7427078.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!