ansible - 在本地系统上使用 unarchive 模块时出现 ansible 错误
问题描述
请。帮助我有这个剧本:
---
- name: Install service
hosts: some_host
vars:
app: "{{ app_name }}-{{ tag }}.war"
app_folder: "{{ client_dir }}/{{ app_name }}"
tasks:
- name: Unpack archive Java
unarchive:
src={{ java_distrib }}
dest={{ app_folder }}
creates="{{ app_folder }}/{{ java_home }}"
mode=0555
当我在远程主机上安装时一切正常。但是当我运行 ansible-playbook 的主机是同一台机器时,我收到了这个错误:
TASK [Unpack archive Java] *********************************************************************************************************
fatal: [10.2.9.6]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 10.2.9.6 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/home/stend/.ansible/tmp/ansible-tmp-1586175452.58-42679814338845/AnsiballZ_unarchive.py\", line 114, in <module>\r\n _ansiballz_main()\r\n File \"/home/stend/.ansible/tmp/ansible-tmp-1586175452.58-42679814338845/AnsiballZ_unarchive.py\", line 106, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/stend/.ansible/tmp/ansible-tmp-1586175452.58-42679814338845/AnsiballZ_unarchive.py\", line 49, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/tmp/ansible_unarchive_payload_f_poEj/__main__.py\", line 157, in <module>\r\n File \"/tmp/ansible_unarchive_payload_f_poEj/ansible_unarchive_payload.zip/ansible/module_utils/urls.py\", line 402, in <module>\r\nAttributeError: 'module' object has no attribute 'HTTPSConnection'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
我m not understand whats going on. Why connection closed? i
尝试取消归档到本地机器。我哪里错了?请帮忙!
解决方案
问题解决了,我重新安装python和库libssl1.1
推荐阅读
- arrays - 如何使用 *NgFor 在 html 表中显示 JSON 数组?
- git - 如何使用 Git Flow 合并开发中已经存在的一些(不是全部)功能分支?
- javascript - 仅当嵌套子菜单存在时才切换类
- sqlite - SQLite Record Format 两个或三个字节的 varints 如何达到 BLOB LIMIT 231-1 或 2147483647
- dart - 在列表中没有项目的情况下处理 onDismissed
- javascript - 相对于根目录的 Javascript 列表文件
- git - 为什么 git rm --cached 不删除本地曾经跟踪的文件而是其他文件
- angularjs - 使用 Webpack 的 Karma:伊斯坦布尔覆盖率为 100%(0/0)
- java - 哪些是用于 firebase 数据库的 Listner?
- amazon-web-services - 如果我们要旋转大约 500-600 个虚拟机,如何节省 ec2 实例的成本