ovirt_vm - HTTP response code is 404

22 views
Skip to first unread message

Alexander Li

unread,
Aug 2, 2019, 6:47:13 AM8/2/19
to Ansible Project
Hi Expert,

Currently I'm using Ansible 2.8.1 module ovirt_vm for provisioning VM in RHEV 4.0.
I able to log in to RHEV using ovirt_auth but when I provision VM using ovirt_vm, it failed with error 404.
Could you give me advise how to fix it? Does RHEV 4.0 supported in ovirt_vm Ansible 2.8?
Thanks in advance.

Following is my playbook & its output.

Playbook


- name: Create VM on RHV

  hosts: localhost

  connection: local

  gather_facts: false

  tasks:

  - name: Login to oVirt

    ovirt_auth:

      url: "https://172.16.11.65/ovirt-engine/api/"

      username: "admin@internal"

      password: "password1234"

      ca_file: "/etc/pki/ovirt-engine/ca.pem"

      insecure: "true"

 

  - name: Debug ovirt auth result

    debug:

     msg: "{{ ovirt_auth }}"

 

  - name: Provisioning VM from template

    ovirt_vm:

     auth: "{{ ovirt_auth }}"

     state: running

     name: bimo_ansiblevm

     template: VmTestTemplate

     cluster: root-Local


Response

PLAY [Create VM on RHV] *********************

 

TASK [Login to oVirt] *********************

ok: [localhost]

 

TASK [Debug ovirt auth result] ******************

ok: [localhost] => {

    "msg": {

        "ca_file": "/etc/pki/ovirt-engine/ca.pem",

        "compress": true,

        "headers": null,

        "insecure": true,

        "kerberos": false,

        "timeout": 0,

        "token": "Vae2y_gZuKMZhxweXoJdcA4bALKE5UeZmSqc7SCW--EC-4MCt1B6HdKFsj87SfNXnNfcX8UefNdqxdi2KVvmWw",

        "url": "https://172.16.11.65/ovirt-engine/api/"

    }

}

 

TASK [Provisioning VM from template] ****************

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NotFoundError: HTTP response code is 404.

fatal: [localhost]: FAILED! => {"changed": false, "msg": "HTTP response code is 404."}

...ignoring

 

PLAY RECAP ************************

localhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=1


Best Regards,
Alexander

Jonathan Lozada De La Matta

unread,
Aug 2, 2019, 8:06:39 AM8/2/19
to ansible...@googlegroups.com
everything looks good to me. Can you access that apo link?

Jonathan Lozada De La Matta on mobile
 

From: ansible...@googlegroups.com on behalf of Alexander Li <alexo...@gmail.com>
Sent: Friday, August 2, 2019 6:47 AM
To: Ansible Project
Subject: [ansible-project] ovirt_vm - HTTP response code is 404
 
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7bc7e354-abdd-4009-b854-48d27cdef9ce%40googlegroups.com.

Alexander Li

unread,
Aug 4, 2019, 11:27:25 PM8/4/19
to Ansible Project
Hi Jonathan,

Thanks for giving guide.

Best Regards,
Alexander
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages