ansible 安装和使用

## 安装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

 

posted @   别动我的网盘  阅读(248)  评论(0编辑  收藏  举报
编辑推荐:
· 对象命名为何需要避免'-er'和'-or'后缀
· SQL Server如何跟踪自动统计信息更新?
· AI与.NET技术实操系列:使用Catalyst进行自然语言处理
· 分享一个我遇到过的“量子力学”级别的BUG。
· Linux系列:如何调试 malloc 的底层源码
阅读排行:
· 对象命名为何需要避免'-er'和'-or'后缀
· JDK 24 发布,新特性解读!
· C# 中比较实用的关键字,基础高频面试题!
· .NET 10 Preview 2 增强了 Blazor 和.NET MAUI
· SQL Server如何跟踪自动统计信息更新?
点击右上角即可分享
微信分享提示