我想使用 ansible 来管理 opennebula。在我的 ansible 服务器中,我安装了 community.general(ansible-galaxy 集合)、pyone 和 oca-decorators。在我的 opennebula 服务器中,我安装了 pyone 和 oca-decorators。
我创建了一个包含以下内容的剧本:
- hosts: myopennebulaserver
become: false
become_method: sudo
tasks:
- name: Gather facts about all images
community.general.one_image_info:
api_url: https://myopennebulaurlserver
api_username: "myopennebulawebuserserver"
api_password: "myopennebulawebpasswordserver"
register: result
当我执行剧本时,我避免了这个错误:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: xmlrpclib.ProtocolError: <ProtocolError for https://myopennebulaurlserver/RPC2: 401 401 Client Error: Unauthorized>
有什么建议么?
谢谢你。