跳转到内容

安装

bash
# ubuntu
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible

使用

添加远程主机

bash
sudo vim /etc/ansible/hosts
192.168.234.130

连接远程主机配置

bash
# 生成密钥对
ssh-keygen -t rsa

# 将密钥添加到目标服务器
ssh-copy-id zhucuiding@192.168.234.130

基于 MIT 许可发布