ansible 安装
ansible 是由python语言编写的一个自动化运维管理工具。它有以下的特点:
不需要安装客户端,通过sshd去通信
基于模块工作,模块可以由任何语言开发
不仅支持命令行使用模块,也支持编写yaml格式的playbook,易于编写和阅读
安装十分简单,centos上可直接yum安装
有提供UI(浏览器图形化)www.ansible.com/tower,收费的 官方文档 http://docs.ansible.com/ansible/latest/index.html
ansible已经被redhat公司收购,它在github上是一个非常受欢迎的开源软件,github地址https://github.com/ansible/ansible
安装
准备两台机器
192.168.127.128 :服务端
192.168.127.129 :客户端
只需要在服务段上安装ansible
yum list |grep ansible # 可以看到自带源里就有2.4版本的ansible
yum install -y ansible # 安装ansible服务端上生成密钥对,上传到客户端
ssh-keygen -t rsa
# 一直回车,生成密钥对
ssh-copy-id root@192.168.127.129 # 将公钥上传至客户端修改配置文件
测试
最后更新于
这有帮助吗?