python - 在 Rhel5 服务器上启用 Ansible 执行
问题描述
我正在使用运行 OL 5.x 的 Oracle Exalogic 工程系统开展一个项目,该系统具有 Python 2.4(ansible 想要 2.6 +)。Rhel5 系统默认使用 python-2.4。但是,最新版本的 Ansible 需要 python-2.6 或更高版本(或 python3 3.5 或更高版本)。我部署了一个自定义编译的 python,但它显然缺少很多 python 模块,所以 ansible playbooks 仍然失败。由于它是一个工程系统,oracle 控制它的更新。由于它基于 Oracle Linux 5.x,因此 Python 2.4 是 Oracle 最新提供的。
错误:
[WARNING]: Unhandled error in Python interpreter discovery for host elpr1cn03
致命:[elpr1cn03.mta-bsc.org]:失败!=> {“ansible_facts”:{},“已更改”:false,“failed_modules”:{“setup”:{“ansible_facts”:{“discovered_interpreter_python”:“/usr/bin/python”},“failed”:true ,“module_stderr”:“与 172.25.216.75 的共享连接已关闭。\r\n”,“module_stdout”:“文件\“/home/mtaipat1/.ansible/tmp/ansible-tmp-1606142841.33-4265-222728891794294/AnsiballZ_setup。 py\“, line 72\r\n with open(args_path, 'rb') as f:\r\n ^\r\nSyntaxError: invalid syntax\r\n”, “msg”: “MODULE FAILURE\nSee stdout /stderr for the exact error”, “rc”: 1, “warnings”: [“主机 elpr1cn03.mta-bsc.org 上的平台 linux 正在使用 /usr/bin/python 中发现的 Python 解释器,但未来安装另一个Python 解释器可以改变这一点。请参阅 https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery。
有人对如何解决此问题有任何提示吗?
解决方案
推荐阅读
- reactjs - 我正在尝试创建反应应用程序,但我得到了这个输出: -
- node.js - 我正在尝试将用户注册 node.js 后端的生成和验证 OTP 与我的颤振应用程序与 Twilio 2FA OTP 集成
- java - 空手道框架 json 响应折叠字段差异顺序然后预期
- c++ - 如何在 C++ 列表中使用 while 循环?
- ubuntu - Keycloak 管理控制台 - 用户名或密码无效
- python - Python, FreePIE 模拟器 mod for mad max
- android - 如何使用kotlin在Android的firebase中获取child的键值
- networking - TCP/IP 标头标志
- python - 烧瓶导入错误 WSL2
- swift - NSDatePicker 前导零