Ansible -的安装部署(Redhat&Centos)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ansible -的安装部署(Redhat&Centos)相关的知识,希望对你有一定的参考价值。

Ansible 的安装部署
PIP 方式安装(Redhat&Centos)
1,安装python-pip&python-devel,
yum install python-pip python-devel -y
2, 安装Ansible 服务
//确认服务器的gcc,glibc 开发环境均安装,如果不确定可以用yum 安装一下;
yum -y install gcc glibc-devel zlib-devel rpm-bulid openssl-devel -y
//升级PIP之最新版本
pip install --upgrade pip
//安装Ansible
pip install ansible
//验证Ansible 安装成功与否
ansible --version
ansible 2.4.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u‘/root/.ansible/plugins/modules‘, u‘/usr/share/ansible/plugins/modules‘]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
YUM 方式安装(Yellow dog Updater,Modifiedy)
//安装EPEL(Extra Packages for Enterprise Linux)
具体的安装方法见EPEL 官网,你需要根据自己的系统选择安装不不同的版本;
https://fedoraproject.org/wiki/EPEL/zh-cn
//EPEL 安装成功之后yum 安装Ansible (验证ansible 的方法如上)
yum install ansible -y

以上是关于Ansible -的安装部署(Redhat&Centos)的主要内容,如果未能解决你的问题,请参考以下文章

ansible -h 报错

Ansible基础使用

Ansible 学习总结—— Ansible 控制提权相关知识总结

Ansible 学习总结—— Ansible 控制提权相关知识总结

ansible

sh 充分利用Ansible和Ansible剧本。请参阅http://docs.ansible.com/ansible/playbooks_best_practices.html