通过yum(CentOS, RHEL)安装

系统版本:

CentOS7.2

yum install ansible -y

  

通过pip安装

安装easy_install

# 安装easy_install
yum –y install easy_install # 修改easy_install源
cat >> ~/.pydistutils.cfg <<EOF
[easy_install]
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
EOF # 修改pip源
mkdir ~/.pip
cat >> ~/.pip/pip.conf <<EOF
[global]
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
format = columns
EOF # 安装
easy_install pip
pip install ansible

  

通过源码安装

wget -O /etc/yum.repos.d/epel.repo   https://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/epel?codeblock=0

# 修改easy_install源
cat >> ~/.pydistutils.cfg <<EOF
[easy_install]
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
EOF # 修改pip源
mkdir ~/.pip
cat >> ~/.pip/pip.conf <<EOF
[global]
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
format = columns
EOF # 安装依赖 yum -y install gcc gcc-c++ make python-devel python-setuptools sshpass easy_install pip git clone git://github.com/ansible/ansible.git --recursive cd ./ansible python setup.py install mkdir /etc/ansible/ cp examples/{ansible.cfg,hosts} /etc/ansible/ # 如果下载得是release版本的zip/tar.gz文件。执行命令的时候如果出现:
localhost | FAILED! => { "failed": true, "msg": "The module ping was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem." } 那就 需要再次下载下面这两个仓库,放在/lib/ansible/modules/目录下,再进行安装

  

Ansible 手册系列 二(安装)的更多相关文章

  1. 开源一款强大的文件服务组件(QJ_FileCenter)(系列二 安装说明)

    系列文章 1. 开源一款强大的文件服务组件(QJ_FileCenter)(系列一) 2. 开源一款强大的文件服务组件(QJ_FileCenter)(系列二 安装说明) 3. 开源一款强大的文件服务组件 ...

  2. Ansible Tower系列 二(安装 Tower)【转】

    文档:http://docs.ansible.com/ansible-tower/ 安装前检查 python版本为2.6 保持网络畅通 内存预留充足 安装用户为root 软件下载 下载地址:http: ...

  3. Ansible 小手册系列 二十(经常遇到的问题)

    (1). 怎么为任务设置环境变量? - name: set environment shell: echo $PATH $SOME >> /tmp/a.txt environment: P ...

  4. WordPress版微信小程序开发系列(二):安装使用问答

    自WordPress版微信小程序发布开源以来,受关注的程度超过我原来的想象.这套程序主要面对的用户是wordpress网站的站长,如果wordpress站想在微信的生态圈得到推广,小程序成为一种重要的 ...

  5. Ansible 手册系列 一(介绍)

    一 介绍 Ansible 是一个配置管理和应用部署工具,功能类似于目前业界的配置管理工具 Chef,Puppet,Saltstack.Ansible 是通过 Python 语言开发.Ansible 平 ...

  6. 阿里云CentOS7系列二 -- 安装Tomcat7的方法

    前面讲到了JDK在CentOS7 环境下的安装步骤.这次来分享安装Tomcat7的安装步骤: Tomcat7 安装包: 链接: http://pan.baidu.com/s/1geKwASN 密码: ...

  7. 随笔编号-11 阿里云CentOS7系列二 -- 安装Tomcat7的方法

    前面讲到了JDK在CentOS7 环境下的安装步骤.这次来分享安装Tomcat7的安装步骤: Tomcat7 安装包: 链接: http://pan.baidu.com/s/1geKwASN 密码: ...

  8. Ansible系列(二):选项和常用模块

    html { font-family: sans-serif } body { margin: 0 } article,aside,details,figcaption,figure,footer,h ...

  9. Open vSwitch系列之二 安装指定版本ovs

    在ovs学习过程中,如果自己想要安装一个ovs交换机其实一条简单的命令 apt  install openvswitch 就可以了,但是这种方法只能安装低版本的ovs.在特殊情况下需要安装指定版本,例 ...

随机推荐

  1. React:快速上手(7)——使用中间件实现异步操作

    React:快速上手(7)——使用中间件实现异步操作 本文参考链接:Stack Overflow redux-thunk 我们使用store.dispath进行派发时,只能传递一个普通对象进去,如下: ...

  2. org.apache.ibatis.binding.BindingException: Mapper method 'attempted to return null from a method with a primitive return type (long).

    一.问题描述 今天发现测试环境报出来一个数据库相关的错误 org.apache.ibatis.binding.BindingException: Mapper method 'attempted to ...

  3. 手机端1px细线公共类

    手机端1px细线公共类 .borderBottom1px{ position: relative; } .borderBottom1px:after{ content: ""; p ...

  4. log4j相关配置

    1.概述         log4j是Apache提供的一个日志实现,可以用于我们项目中的日志记录,有log4j1和log4j2两个版本,本文使用log4j2这个版本.SLF4J(Simple log ...

  5. The 15th UESTC Programming Contest Preliminary B - B0n0 Path cdoj1559

    地址:http://acm.uestc.edu.cn/#/problem/show/1559 题目: B0n0 Path Time Limit: 1500/500MS (Java/Others)    ...

  6. Windows 配置安卓环境变量

    变量名:JAVA_HOME 变量值:JDK 路径 变量名:CLASSPATH 变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\toos.jar      // ...

  7. Druid学习之路 (一)Druid初识

    作者:Syn良子 出处:https://www.cnblogs.com/cssdongl/p/9588079.html 转载请注明出处 最近在学习和使用Druid.觉得一些章节有必要按照自己的理解翻译 ...

  8. js 空数组 空对象判断

    js 空数组是true还是false   1 2 var arr = new Array(); // 或 var arr = []; 我们知道,初始化后,即使数组arr中没有元素,也是一个object ...

  9. 【Python】IO编程

    文件读写 StringIO和BytesIO 操作文件和目录 序列化 学习廖老师的py官网的笔记 1.stream的概念.数据交换通常需要建立两根“水管”. 2.同步IO和异步IO.异步性能高,但是编程 ...

  10. 注意:PHP7中十个需要避免的坑

    1.不要使用mysql_函数 这一天终于来了,从此你不仅仅“不应该”使用mysql_函数.PHP7已经把它们从核心中全部移除了,也就是说你需要迁移到好得多的mysqli_函数,或者更灵活的PDO实现. ...