0

I want to use ansible for manage opennebula. In my ansible server, I have installed community.general (ansible-galaxy collection), pyone and oca-decorators. In my opennebula server, I have installed pyone and oca-decorators.

I have created a playbook with this content:

- 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

When I exec the playbook I obtent this error:

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>

Any suggestions?

Thank you.

JeyC
  • 1
  • 1
    Hi JeyC, welcome to SO. The error message implies that your credentials are not valid for that URL; are you able to use those same credentials outside of ansible? What troubleshooting steps have you already taken and what were their outcomes? – mdaniel May 04 '21 at 15:42
  • This really looks like auth problem. I wasn't able to reproduce the issue using the same playbook you provided (including https etc). `oneimage list` works for you using the same creds? What ansible version do you use? (I would add a comment as this is not an answer but lacking reputation :-$) – jorel May 05 '21 at 10:15

0 Answers0