1.安装完成后允许命令报错

Traceback (most recent call last):
File "/usr/bin/ansible", line , in <module>
(runner, results) = cli.run(options, args)
File "/usr/bin/ansible", line , in run
extra_vars=extra_vars,
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line , in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.6/subprocess.py", line , in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line , in _execute_child
raise child_exception
OSError: [Errno ] No such file or directory

解决方法:

# yum install openssh-clients

2.出现Error: ansible requires a json module, none found!

SSH password:
10.0.1.110 | FAILED >> {
"failed": true,
"msg": "Error: ansible requires a json module, nonefound!",
"parsed": false
}

解决方法:

python版本过低,要不升级python要不就升级安装python-simplejson。

3.安装完成后连接客户端服务器报错

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即可

4.如果客户端不在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取消注释

5.出现FAILED => FAILED: not a valid DSA private key file

解决方法:

需要你在最后添加参数-k

6.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 文件。需要升级前备份此文件最后还原即可登录。

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

解决方法:

# yum install libselinux-python -y

  

  

最新文章

  1. Spring mvc 下Ajax获取JSON对象问题 406错误
  2. gromacs, quake III和vrsqrtps
  3. NABC模型进行需求分析
  4. wordpress网站被挂马以及防御方法
  5. asp.net 父窗体获取子窗体的返回值,可用来对父窗体局部更新
  6. jQuery入门[3]-事件
  7. Java多线程之~~~使用Exchanger在线程之间交换数据[这个结合多线程并行会有解决很多问题]生产者消费者模型
  8. asp.net SignalR 一对一聊天
  9. Winform美化MessageBox
  10. VMware虚拟机安装Linux系统
  11. eclipse的操作
  12. HTML:DOM 对象
  13. asp.net 修改AD账号信息
  14. Nginx+FastCGI运行原理(一)
  15. [设计模式]工厂模式factory
  16. 从零开始学习Vue(二)
  17. 使用Oracle PROFILE控制会话空闲时间
  18. part1:13-linux编译器GCC
  19. iOS开发中的错误整理,导航控制器的导航栏取消系统渲染的错误
  20. a7

热门文章

  1. 起航,第一个程序——还是LED灯
  2. Apache Rewrite 拟静态
  3. java 新特性学习笔记
  4. php5共存php7
  5. cmake 安装 mysql5.5 版本
  6. Emmet快速编写HTML代码
  7. 关于Cocos2d-x中自定义的调用注意事项
  8. Unity获取文件夹下指定类型的文件数量
  9. printf 字体颜色打印
  10. 【HDU】3622 Bomb Game(2-SAT)