1、出现Error:
ansible requires a json module, none found!
SSH password:
192.168.24.15 | FAILED >> {
   "failed": true,
   "msg": "Error: ansible requires a json module, nonefound!",
   "parsed": false
}
解决:python版本过低,要不升级python要不就安装python-simplejson
2、安装完成后连接客户端服务器报错:
FAILED => Using a SSH password insteadof a key is not possible because Host Key checking is enabled and sshpass doesnot support this.  Please add this host'sfingerprint to your known_hosts
file to manage this host.
解决:在ansible 服务器上使用ssh 登陆下/etc/ansible/hosts 里面配置的服务器。然后再次使用ansible 去管理就不会报上面的错误了!但这样大批量登陆就麻烦来。因为默认ansible是使用key验证的,如果使用密码登陆的服务器,使用ansible的话,要不修改ansible.cfg配置文件的ask_pass
= True给取消注释,要不就在运行命令时候加上-k,这个意思是-k,
--ask-pass ask for SSH password。再修改:host_key_checking= False即可
3、如果客户端不在know_hosts里将会报错
paramiko: The authenticity of host '192.168.24.15'can't be established.
The ssh-rsa key fingerprint is397c139fd4b0d763fcffaee346a4bf6b.
Are you sure you want to continueconnecting (yes/no)?
解决:需要修改ansible.cfg的#host_key_checking=
False取消注释
4、出现FAILED
=> FAILED: not a valid DSA private key file
解决:需要你在最后添加参数-k
5、openssh升级后无法登录报错
PAM unable todlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot openshared object
file: No such file or directory
解决:sshrpm 升级后会修改/etc/pam.d/sshd 文件。需要升级前备份此文件最后还原即可登录。
6、pip安装完成后,运行ansible报错:
File "/usr/lib64/python2.6/subprocess.py",line 642, in init errread, errwrite)
解决:安装:yum
installopenssh-clients
7、第一次系统初始化运行生成本机ansible用户key时报错
failed: [127.0.0.1] =>{"checksum": "f5f2f20fc0774be961fffb951a50023e31abe920","failed": true}
msg: Aborting, target uses selinux but pythonbindings (libselinux-python) aren't installed!
FATAL: all hosts have already failed –aborting
解决:# yuminstall libselinux-python -y
注意这个是在 host机器上安装,不是在ansible控制机器上。

ansible安装过程遇到的问题的更多相关文章

  1. Ansible安装过程中常遇到的错误(FAQ)

    1.安装完成后允许命令报错 Traceback (most recent call last): File , in <module> (runner, results) = cli.ru ...

  2. ansible的安装过程 和基本使用

    之前安装了一遍,到最后安装成功的时候出现了这种问题: [root@localhost ~]# ansible webserver -m command -a 'uptime' ............ ...

  3. win10的pycharm中安装ansible模块过程

    前面的安装报错信息 ansible模块安装报错:Could not install packages due to an OSError: [Errno 2] No such file or dire ...

  4. Ansible安装配置及使用

    一.Ansible特点 1.不需要安装客户端,通过sshd通信 2.基于模块工作,模块可以由任何序言开发 3.不仅支持命令行使用模块,也支持编写yaml格式的playbook 4.支持sudo 5.有 ...

  5. Ansible安装部署以及常用模块详解

    一.  Ansible 介绍Ansible是一个配置管理系统configuration management system, python 语言是运维人员必须会的语言, ansible 是一个基于py ...

  6. Ansible 安装与配置(一)

    公司大概有200多云主机需要进行管理,但是如果通过手工管理费时还累最终结果也容易出错,所以考虑通过自动化的方式来管理云主机,目前开源的自动化工具,大家用的比较多的有Ansible和Saltstack这 ...

  7. ansible安装配置及最佳实践roles

    ansible是什么? ansible是一款轻量级配置管理工具,用于远程批量部署.安装.配置.类似的还有puppet.saltstack,各有所长,任君自选. 官方文档:http://docs.ans ...

  8. 第1天:Ansible安装部署

    Ansible介绍 Ansible是一个简单的自动化引擎,可完成配置管理.应用部署.服务编排以及各种IT需求.它是一款使用Python语言开发实现的开源软件,其依赖Jinjia2.paramiko和P ...

  9. ansible安装及使用

    一.ansible介绍 1.ansible简介 官方的title是“Ansible is Simple IT Automation”——简单的自动化IT工具. Ansible跟其他IT自动化技术的区别 ...

随机推荐

  1. 数据分析与展示---Pandas库数据特征分析

    说明:0轴axis=0和1轴axis=1 简介 一:数据的排序 二:数据的基本统计分析 三:数据的累积统计分析 四:数据的相关分析 一:数据的排序 a b c d a b c d 二:数据的基本统计分 ...

  2. fopen()、fwrite()、fread()函数使用说明与示例

    fopen()函数: 1.作用: 在C语言中fopen()函数用于打开指定路径的文件,获取指向该文件的指针. 2.函数原型: FILE * fopen(const char * path,const  ...

  3. noVNC连接CentOS,以Web方式交付VNC远程连接

    什么是noVNC? noVNC 是一个 HTML5 VNC 客户端,采用 HTML 5 WebSockets, Canvas 和 JavaScript 实现,noVNC 被普遍用在各大云计算.虚拟机控 ...

  4. bzoj千题计划151:bzoj1131: [POI2008]Sta

    http://www.lydsy.com/JudgeOnline/problem.php?id=1131 dp[i]=dp[fa[i]]-son[i]+n-son[i] #include<cst ...

  5. 【重要】Nginx模块Lua-Nginx-Module学习笔记(三)Nginx + Lua + Redis 已安装成功(非openresty 方式安装)

    源码地址:https://github.com/Tinywan/Lua-Nginx-Redis 一. 目标 使用Redis做分布式缓存:使用lua API来访问redis缓存:使用nginx向客户端提 ...

  6. Function Names as Strings

    [Function Names as Strings] GCC provides three magic variables that hold the name of the current fun ...

  7. 多角度看.NET面试题

    1.ASP.NET中的身份验证有那些?你当前项目采用什么方式验证请解释        身份验证是从用户获取名称和密码等标识凭证并根据某些机构验证这些凭据的过程.如果凭据有效,则提交该凭据的实体被视为通 ...

  8. BZOJ4816 数字表格

    4816: [Sdoi2017]数字表格 Time Limit: 50 Sec  Memory Limit: 128 MB Description Doris刚刚学习了fibonacci数列.用f[i ...

  9. 20155234 2016-2017-2 《Java程序设计》第6周学习总结

    20155234 2016-2017-2 <Java程序设计>第6周学习总结 教材学习内容总结 Java将输入/输出抽象化为串流,数据有来源及目的地,衔接两者的是串流对象. 从应用程序角度 ...

  10. HDU 1242 Rescue (广搜)

    题目链接 Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The priso ...