<div dir="ltr">Yes, pip repo has 2.2. will use the add_vm_nic.py for now.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 5:07 PM, Ondra Machacek <span dir="ltr">&lt;<a href="mailto:omachace@redhat.com" target="_blank">omachace@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Mar 8, 2017 at 3:44 PM, Oğuz Yarımtepe <span dir="ltr">&lt;<a href="mailto:oguzyarimtepe@gmail.com" target="_blank">oguzyarimtepe@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Below is my playbook</div><div><br></div><div><div>---</div><div>- name: Setup oVirt environment</div><div>  hosts: vms</div><div>  tasks:</div><div>    - block:</div><div>        - name: Include oVirt password</div><div>          #no_log: true</div><div>          include_vars: vars.yml</div><div><br></div><div>        - name: Obtain SSO token</div><div>          no_log: true</div><div>          ovirt_auth:</div><div>            url: &quot;{{ url }}&quot;</div><div>            username: &quot;{{ username }}&quot;</div><div>            password: &quot;{{ password }}&quot;</div><div>            ca_file: &quot;{{ ca_file }}&quot;</div><div><br></div><div>        - name: Create and run VM from template</div><div>          ovirt_vms:</div><div>            auth: &quot;{{ ovirt_auth }}&quot;</div><div>            name: &quot;{{ vm }}&quot;</div><div>            template: &quot;{{ template }}&quot;</div><div>            cluster: &quot;{{ cluster }}&quot;</div><div>            memory: &quot;{{ memory }}&quot;</div><div>            memory_guaranteed: &quot;{{ memory_guaranteed }}&quot;</div><div>            high_availability: true</div><div>            cpu_cores: &quot;{{ cpu_cores }}&quot;</div><div>            cpu_sockets: &quot;{{ cpu_sockets }}&quot;</div><div>            type: server</div><div>            name: &quot;{{ vm }}&quot;</div><div>            operating_system: other_linux</div><div>            state: stopped</div><div>            wait: yes</div><div><br></div><div>        #- name: Add nic</div><div>        #  ovirt_nics:</div><div>        #    auth: &quot;{{ ovirt_auth }}&quot;</div><div>        #    name: &quot;{{ nic_name }}&quot;</div><div>        #    profile: &quot;{{ profile_name }}&quot;</div><div>        #    state: plugged</div><div>        #    vm: &quot;{{ vm }}&quot;</div><div>        #    wait: yes</div><div><br></div><div>      always:</div><div>        - name: Revoke the SSO token</div><div>          ovirt_auth:</div><div>            state: absent</div><div>            ovirt_auth: &quot;{{ ovirt_auth }}&quot;</div><div><br></div><div>When i remove the commented lines here is what i got:</div><div><br></div><div><div>ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.</div></div></div></div></blockquote><div><br></div></div></div><div>ovirt_nics module is part of the Ansible 2.3, and I guess you are using Ansible 2.2. That&#39;s why it can&#39;t find the module.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><br></div><div>The error appears to have been in &#39;/Users/oyarimtepe/test/ovirt-<wbr>ansible/create_vm_from_templat<wbr>e/playbook.yml&#39;: line 35, column 11, but may</div><div>be elsewhere in the file depending on the exact syntax problem.</div><div><br></div><div>The offending line appears to be:</div><div><br></div><div><br></div><div>        - name: Add nic</div><div>          ^ here</div><div><br></div><div><br></div><div>The error appears to have been in &#39;/Users/oyarimtepe/test/ovirt-<wbr>ansible/create_vm_from_templat<wbr>e/playbook.yml&#39;: line 35, column 11, but may</div><div>be elsewhere in the file depending on the exact syntax problem.</div><div><br></div><div>The offending line appears to be:</div><div><br></div><div><br></div><div>        - name: Add nic</div><div>          ^ here</div></div><div><br></div><div>I tried using the nics attribute of ovirt_vms module but this time i got Nic[Name] is required although i defined as below:</div><div><br></div><div>nics:</div><div>  - name: &quot;{{ nic_name }}&quot;</div><div>  - profile_name: &quot;{{ profile_name }}&quot;</div></div></div></blockquote><div><br><br></div></span><div>This is a list of dictionary, so this should be:<br><br></div><div>nics:<br></div><div>  - name: &quot;{{ nic_name }}&quot;<br>    profile_name: &quot;{{ profile_name }}&quot;<br><br></div><div>(no second dash)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><div dir="ltr"><div><div><br></div><div>without comments it works. Any idea? Any way to set the nic and profile via SDK? An example will be great.</div><span class="m_3076722732349419688gmail-HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_3076722732349419688gmail-m_1139176698101192808gmail_signature">Oğuz Yarımtepe<br><a href="http://about.me/oguzy" target="_blank">http://about.me/oguzy</a></div>
</font></span></div></div>
<br></span>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Oğuz Yarımtepe<br><a href="http://about.me/oguzy" target="_blank">http://about.me/oguzy</a></div>
</div>