ansible安装过程遇到的问题
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安装过程遇到的问题的更多相关文章
- Ansible安装过程中常遇到的错误(FAQ)
1.安装完成后允许命令报错 Traceback (most recent call last): File , in <module> (runner, results) = cli.ru ...
- ansible的安装过程 和基本使用
之前安装了一遍,到最后安装成功的时候出现了这种问题: [root@localhost ~]# ansible webserver -m command -a 'uptime' ............ ...
- win10的pycharm中安装ansible模块过程
前面的安装报错信息 ansible模块安装报错:Could not install packages due to an OSError: [Errno 2] No such file or dire ...
- Ansible安装配置及使用
一.Ansible特点 1.不需要安装客户端,通过sshd通信 2.基于模块工作,模块可以由任何序言开发 3.不仅支持命令行使用模块,也支持编写yaml格式的playbook 4.支持sudo 5.有 ...
- Ansible安装部署以及常用模块详解
一. Ansible 介绍Ansible是一个配置管理系统configuration management system, python 语言是运维人员必须会的语言, ansible 是一个基于py ...
- Ansible 安装与配置(一)
公司大概有200多云主机需要进行管理,但是如果通过手工管理费时还累最终结果也容易出错,所以考虑通过自动化的方式来管理云主机,目前开源的自动化工具,大家用的比较多的有Ansible和Saltstack这 ...
- ansible安装配置及最佳实践roles
ansible是什么? ansible是一款轻量级配置管理工具,用于远程批量部署.安装.配置.类似的还有puppet.saltstack,各有所长,任君自选. 官方文档:http://docs.ans ...
- 第1天:Ansible安装部署
Ansible介绍 Ansible是一个简单的自动化引擎,可完成配置管理.应用部署.服务编排以及各种IT需求.它是一款使用Python语言开发实现的开源软件,其依赖Jinjia2.paramiko和P ...
- ansible安装及使用
一.ansible介绍 1.ansible简介 官方的title是“Ansible is Simple IT Automation”——简单的自动化IT工具. Ansible跟其他IT自动化技术的区别 ...
随机推荐
- idea插件安装的通用操作
序:今天下午看到一个bug,很神奇,粘出来大家看看 看到这个异常栈,有经验的或者查到的答案都是mapper.xml中哪个的方法配置错了,应替换parameterMap为parameterType, 奇 ...
- nodejs express 上传文件 (格式 FormData)
前台代码使用jQuery的ajax: <script type="text/javascript"> $(function(){ $('#file_upload').c ...
- [转载]AMD 的 CommonJS wrapping
https://www.imququ.com/post/amd-simplified-commonjs-wrapping.html 它是什么? 为了复用已有的 CommonJS 模块,AMD 规定了 ...
- 知识笔记:jQuery 事件对象属性小结
使用事件自然少不了事件对象.因为不同浏览器之间事件对象的获取,以及事件对象的属性都有差异,导致我们很难跨浏览器使用事件对象.jQuery中统一了事件对象,当绑定事件处理函数时,会将jQuery格式化后 ...
- 美轮美奂!9款设计独特的jQuery/CSS3全新应用插件(下拉菜单、动画、图表、导航等)
今天要为大家分享9款设计非常独特的jQuery/CSS3全新应用插件,插件包含菜单.jQuery焦点图.jQuery表单.jQuery图片特效等.下面大家一起来看看吧. 1.jQuery水晶样式下拉导 ...
- 20155321 2016-2017-2 《Java程序设计》第六周学习总结
20155321 2016-2017-2 <Java程序设计>第六周学习总结 教材学习内容总结 第十章 IO 流 IO 流用来处理设备之间的数据传输 Java对数据的操作是通过流的方式 J ...
- HDU 1535 Invitation Cards (最短路)
题目链接 Problem Description In the age of television, not many people attend theater performances. Anti ...
- 关于maven环境下使用pom.xml引入包名.lastUpdate包的解决办法
今天在导入POI-OOXML的时候总是缺失xmlbeans包,而且刷新pom文件总是生成一个lastupdate文件,大小为1KB,终于找到解决办法. 1.首先删除想要的jar包所在文件夹内的所有 . ...
- Git 管理本地代码【转】
转自:http://www.cnblogs.com/JessonChan/archive/2011/03/16/1986570.html 以前用SVN,不过没有用出感情来:倒是用出不少怨恨:由于没有很 ...
- ASP.net-空白页的问题
protected void Application_Error(object sender, EventArgs e) { ILog log = LogMan ...