<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: "{{ url }}"</div><div> username: "{{ username }}"</div><div> password: "{{ password }}"</div><div> ca_file: "{{ ca_file }}"</div><div><br></div><div> - name: Create and run VM from template</div><div> ovirt_vms:</div><div> auth: "{{ ovirt_auth }}"</div><div> name: "{{ vm }}"</div><div> template: "{{ template }}"</div><div> cluster: "{{ cluster }}"</div><div> memory: "{{ memory }}"</div><div> memory_guaranteed: "{{ memory_guaranteed }}"</div><div> high_availability: true</div><div> cpu_cores: "{{ cpu_cores }}"</div><div> cpu_sockets: "{{ cpu_sockets }}"</div><div> type: server</div><div> name: "{{ vm }}"</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: "{{ ovirt_auth }}"</div><div> # name: "{{ nic_name }}"</div><div> # profile: "{{ profile_name }}"</div><div> # state: plugged</div><div> # vm: "{{ vm }}"</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: "{{ ovirt_auth }}"</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><br></div><div>The error appears to have been in '/Users/oyarimtepe/test/ovirt-ansible/create_vm_from_template/playbook.yml': 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 '/Users/oyarimtepe/test/ovirt-ansible/create_vm_from_template/playbook.yml': 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: "{{ nic_name }}"</div><div> - profile_name: "{{ profile_name }}"</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><div><br></div>-- <br><div class="gmail_signature">Oğuz Yarımtepe<br><a href="http://about.me/oguzy" target="_blank">http://about.me/oguzy</a></div>
</div></div>