This is a cryptographically signed message in MIME format.
--------------ms010807000501020509040004
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Hi,
On 02/01/2017 04:06 PM, Ondra Machacek wrote:
On Wed, Feb 1, 2017 at 3:27 PM, Ji=C5=99=C3=AD Sl=C3=A9=C5=BEka
<jiri.s=
lezka(a)slu.cz> wrote:
> Hi Ondra,
>
>
> I am testing oVirt ansible modules and I am stucked in this simple sce=
nario.
> I would like to create a new vm with new bootable disk attached
to it.=
>
> I wrote this simple role for it
>
>
http://pastebin.com/XwwyCH4b
>
> when I run it I got
>
>
> $ ansible-playbook site.yml
>
> PLAY [create ovirt vm]
> *********************************************************
>
> TASK [setup]
> *******************************************************************
> ok: [localhost]
>
> TASK [create_vm : ovirt_auth]
> **************************************************
> ok: [localhost]
>
> TASK [create_vm : ovirt_disks]
> *************************************************
> changed: [localhost]
>
> TASK [create_vm : ovirt_vms]
> ***************************************************
> fatal: [localhost]: FAILED! =3D> {"changed": false, "failed":
true, "m=
sg":
> "Fault reason is \"Operation Failed\". Fault
detail is \"[Cannot run V=
M
> without at least one bootable disk.\nAlternatives:\n- Create a
disk fo=
r this
> VM, and rerun the VM.\n- Change the boot sequence using the Edit
VM co=
mmand
> (Boot Option Sub-Tab).\n- Use the 'Run Once' command to
select a diffe=
rent
> boot option and rerun the VM.]\". HTTP response code is
409."}
> to retry, use: --limit
> @/home/dron/#work/#cit/ovirt/ansible/ovirt/site.retry
>
> PLAY RECAP
> *********************************************************************
> localhost : ok=3D3 changed=3D1 unreachable=3D0 =
failed=3D1
>
>
> In the manager I can see the is disk successfully created, vm too, dis=
k is
> attached to vm but not activated.
>
> When I activate it manually, I am able to run this vm.
>
> Any ideas how can I achieve this via ansible?
Yes, this is bug which was fixed[1], but wasn't backported to 2.2.
But since you are using role you are good.
Just download lastest vms module[2] and put it into the library directo=
ry,
which you must create in your role, for example:
$ mkdir roles/vm-create-role/library
$ cd roles/vm-create-role/library
$ wget
https://raw.githubusercontent.com/ansible/ansible-modules-extra=
s/devel/cloud/ovirt/ovirt_vms.py
yes, it is the way.
I have downloaded devel version of module, put it into library=20
directory. It was correctly used by ansible but it failed with an error
"msg": "'NoneType' object has no attribute 'append'"
never mind, I will wait till Ansible 2.3 and then I'll try it once more.
Cheers,
Jiri
Then it should work OK, at least I think the modules in library has
higher priority.
If not then renaming that module should work, for example:
$ mv ovirt_vms.py ovirt_vms_dev.py
and then use it as:
tasks:
...
- name: Create vm
ovirt_vms_dev:
name: vm0
...
Btw. in ~month there should be Ansible 2.3 release, with has much more =
features,
vel/cloud/ovirt/ovirt_vms.py
>
>
> Thanks in advance,
>
> Jiri Slezka
>
>
>
>
>
> On 12/02/2016 02:12 PM, Ondra Machacek wrote:
>>
>> Hello all,
>>
>> I would like to kindly ask everyone who is Ansible or oVirt user for
>> testing of the new Ansible oVirt modules. For everyone who is familia=
r
>> with the Ansible and oVirt, this[1] describes the steps you
need to d=
o,
>> to setup oVirt modules library and start using those modules
(Most of=
>> those modules will be available in Ansible 2.3, some of them
are alre=
ady
>> in 2.2).
>>
>> If you have any issue setting this up, please contact me, I will do t=
he
>> best to help you.
>>
>> If you have an issue, which you think is a bug, please open an issue
>> here[2]. Please note that Ansible is merging it's repositories, so si=
nce
>> next week it will actually be stored here[3]. If you are
missing
>> anything please open an issue as well, or just contact me, and I will=
>> do fix it. You are also very welcome to sent PR with fixes.
>>
>> For those who don't have testing environment which can test against,
>> I've created an Vagrant project which will deploy you the oVirt insta=
nce
>> using Ansible playbooks. You can find how to use it here[4].
>>
>> The repository also contains few examples[5], so you don't have to
>> copy-paste them from the source.
>>
>> Thanks all for reading this and any feedback,
>> Ondra
>>
>> [1]
https://github.com/machacekondra/ovirt-tests/releases/tag/0.1
>> [2]
https://github.com/ansible/ansible-modules-extras/issues
>> [3]
https://github.com/ansible/ansible
>> [4]
https://github.com/machacekondra/ovirt-tests
>> [5]
https://github.com/machacekondra/ovirt-tests/tree/master/examples=
>> _______________________________________________
>> Users mailing list
>> Users(a)ovirt.org
>>
http://lists.ovirt.org/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/users
>
--------------ms010807000501020509040004
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
Cn4wggUJMIID8aADAgECAhACt8ndrdK9CetZxFyQDGB4MA0GCSqGSIb3DQEBCwUAMGUxCzAJ
BgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2Vy
dC5jb20xJDAiBgNVBAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xNDExMTgx
MjAwMDBaFw0yNDExMTgxMjAwMDBaMHIxCzAJBgNVBAYTAk5MMRYwFAYDVQQIEw1Ob29yZC1I
b2xsYW5kMRIwEAYDVQQHEwlBbXN0ZXJkYW0xDzANBgNVBAoTBlRFUkVOQTEmMCQGA1UEAxMd
VEVSRU5BIGVTY2llbmNlIFBlcnNvbmFsIENBIDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCwp9Jj5Aej1xPkS1GV3LvBdemFmkUR//nSzBodqsU3dv2BCRD30r4gt5oRsYty
qDGF2nnItxV1SkwVoDxFeRzOIHYNYvBRHaiGvCQjEXzPRTocOSVfWpmq/zAL/QOEqpJogeM+
0IBGiJcAENJshl7UcfjYbBnN5qStk74f52VWFf/aiF7MVJnsUr3oriQvXYOzs8N/NXyyQyim
atBbumJVCNszF1X+XHCGfPNvxlNFW9ktv7azK0baminfLcsh6ubCdINZc+Nof2lU387NCDgg
oh3KsYVcZTSuhh7qp6MjxE5VqOZod1hpXXzDOkjK+DAMC57iZXssncp24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