ansible的基本部署

说明:

   ansible其功能实现基于SSH远程连接服务

   使用ansible需要首先实现ssh密钥连接

1.1 部署ssh key

1.1.3 公钥分发

ssh-copy-id  -i /root/.ssh/id_dsa.pub  [email protected]

如果需要ssh的端口不是默认的22端口,需要在后面加 -p参数指定端口

ssh-copy-id  -i /root/.ssh/id_dsa.pub -p 22333 [email protected]

进行验证 ssh [email protected]

2.安装ansible

yum install libselinux-python -y
 yum install ansible -y

猜你喜欢

转载自www.cnblogs.com/zhong12322/p/10471776.html