<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1849564149;
        mso-list-type:hybrid;
        mso-list-template-ids:-1771529520 -610110070 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have been trying to use the following ansible modules (based on the last devel commit in the ansible github repo for the extras modules 43bb97bc3763b0335e245606eb2985314902cc91):<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>ovirt_vms<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>ovirt_disks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have had varying degrees of success, and I would like to list the following issues:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>Through the REST API, I can define multiple nic card configurations for cloud-init, however only 1 can be done with Ansible. Also, when using templates, it automatically assumes I will be using the last version of the template,
this had to be defined when using REST.<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>Assume I have deployed from a template. This will create a VM with a disk that is already attached. Now, let’s say I want to confirm, or add more disks to the VM. If I pass a number of disks, that have already been attached, and
I reference them by name (in ovirt_disks), I get an error. If I do the same operation by ID it seems to work. However I cannot get the ID when running ansible, I need to get it from REST. When I query ovirt_vms, disk attachments comes up as
<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l0 level2 lfo1">
<![if !supportLists]><span style="font-family:"Courier New""><span style="mso-list:Ignore">o<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>"disk_attachments": [],<o:p></o:p></p>
<p class="MsoListParagraph">If that field gets populated, I could then in turn run ovirt_disks with the ID, after querying the VM to get the attachments, but as it is it cannot be done.<o:p></o:p></p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoListParagraph">I’ll give an example<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">- name: Get Disks<o:p></o:p></p>
<p class="MsoNormal"> ovirt_disks:<o:p></o:p></p>
<p class="MsoNormal"> auth: "{{ovirt_auth}}"<o:p></o:p></p>
<p class="MsoNormal"> vm_name: "{{item.0.name}}"<o:p></o:p></p>
<p class="MsoNormal"> name: "{{item.1.name}}"<o:p></o:p></p>
<p class="MsoNormal"> interface: "{{item.1.interface}}"<o:p></o:p></p>
<p class="MsoNormal"> register: r_disks<o:p></o:p></p>
<p class="MsoNormal"> with_subelements:<o:p></o:p></p>
<p class="MsoNormal"> - "{{virtual_machines }}"<o:p></o:p></p>
<p class="MsoNormal"> - drives<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> If the drives have already been attached this will fail… but<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">- name: Add Disks to VMs<o:p></o:p></p>
<p class="MsoNormal"> ovirt_disks:<o:p></o:p></p>
<p class="MsoNormal"> auth: "{{ovirt_auth}}"<o:p></o:p></p>
<p class="MsoNormal"> vm_name: "{{item.0.name}}"<o:p></o:p></p>
<p class="MsoNormal"> id: 8fc2811e-7774-4903-a5b3-489fdedb377b<o:p></o:p></p>
<p class="MsoNormal"> size: "100GiB"<o:p></o:p></p>
<p class="MsoNormal"> format: "{{item.1.format}}"<o:p></o:p></p>
<p class="MsoNormal"> storage_domain: "{{item.1.storage_domain.name}}"<o:p></o:p></p>
<p class="MsoNormal"> bootable: "{{item.1.bootable}}"<o:p></o:p></p>
<p class="MsoNormal"> interface: "{{item.1.interface}}"<o:p></o:p></p>
<p class="MsoNormal"> state: attached<o:p></o:p></p>
<p class="MsoNormal"> with_subelements:<o:p></o:p></p>
<p class="MsoNormal"> - "{{virtual_machines }}"<o:p></o:p></p>
<p class="MsoNormal"> - drives<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> The second example is working, even if the disk has already been attached.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m assuming that since I’m creating the VM from a template, there might be multiple disks with the same name, and the wrong ID is being retrieved.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m happy to do more testing as further commits appear.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB">Regards<b>,<o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="color:#C00000;mso-fareast-language:EN-GB">Jean Paul Gatt</span></b><span style="color:black;mso-fareast-language:EN-GB"><br>
<br>
</span><span style="font-size:6.0pt;color:gray;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<span style="font-size:6.0pt; font-family:"Arial","sans-serif"; color:gray">This email (including any attachments) is confidential, protected by copyright and/or other intellectual property rights and may be privileged. If you have received it in error, please
notify the sender immediately before deleting the email from your device. Do not use, copy or disclose the information contained in this message or in any attachment. We accept no responsibility for malware that we may have unintentionally transmitted to you
within this email. Those communicating with us by email will be deemed to have consented to us intercepting and monitoring those communications. Gamesys Network Ltd is registered in Malta, with company registration number C47555 and VAT registered number MT19542837.
The registered office is at Capital Business Centre, Entrance A, Level 1, Taz-Zwejt Street, San Gwann SGN3000.
</span>
</body>
</html>