<div dir="ltr">Hello all,<div><br></div><div>i&#39;m trying to implement automatic deploy of vm on a rhevm/ovirt platform using ansible and ovirt_vms module.</div><div><br></div><div>I take rhel 7.3 kvm guest with cloud init like template, i can deploy vm with no problem but when i try using ansible to power up and configure it with cloud init the process fail.</div><div><br></div><div>My playbook is this: </div><div><div>---</div><div>- hosts: ovirt</div><div>  tasks:</div><div>    - name: Parti e configura</div><div>      ovirt_vms:</div><div>          auth:</div><div>            username: admin@internal</div><div>            password: xxxxxxxx</div><div>            url: <a href="https://webaddress/ovirt-engine">https://webaddress/ovirt-engine</a></div><div>            ca_file: /etc/pki/ovirt-engine/ca.pem</div><div>          name: rh7conf</div><div>          cluster: Sviluppo</div><div>          high_availability: true</div><div>          cloud_init:</div><div>            nic_boot_protocol: static</div><div>            nic_ip_address: 10.x.xx.xxx</div><div>            nic_netmask: 255.255.252.0</div><div>            nic_gateway: 10.x.xx.xxx</div><div>            nic_name: eth0</div><div>            nic_on_boot: true</div><div>            host_name: sticameca</div><div>            user_name: root</div><div>            root_password: stapera</div></div><div><br></div><div>my host file is:</div><div><div>[ovirt]</div><div>webaddress ansible_user=root</div></div><div><br></div><div>and  error is:</div><div><br></div><div><div>nsible-playbook -i ~/ansible/ovirt_hosts orig.testovirt_vms.yml -vvvv</div><div>Using /etc/ansible/ansible.cfg as config file</div><div>Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc</div><div><br></div><div>PLAYBOOK: orig.testovirt_vms.yml ***********************************************</div><div>1 plays in orig.testovirt_vms.yml</div><div><br></div><div>PLAY [ovirt] *******************************************************************</div><div><br></div><div>TASK [setup] *******************************************************************</div><div>Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py</div><div>&lt;webaddress&gt; ESTABLISH SSH CONNECTION FOR USER: root</div><div>&lt;webaddress&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/lamponin/.ansible/cp/ansible-ssh-%h-%p-%r webaddress&#39;/bin/sh -c &#39;&quot;&#39;&quot;&#39;( umask 77 &amp;&amp; mkdir -p &quot;` echo ~/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084 `&quot; &amp;&amp; echo ansible-tmp-1487853056.88-81930174841084=&quot;` echo ~/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084 `&quot; ) &amp;&amp; sleep 0&#39;&quot;&#39;&quot;&#39;&#39;</div><div>&lt;webaddress&gt; PUT /tmp/tmp0wuXiN TO /root/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084/setup.py</div><div>&lt;webaddress&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/lamponin/.ansible/cp/ansible-ssh-%h-%p-%r &#39;[webaddress]&#39;</div><div>&lt;webaddress&gt; ESTABLISH SSH CONNECTION FOR USER: root</div><div>&lt;webaddress&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/lamponin/.ansible/cp/ansible-ssh-%h-%p-%r webaddress&#39;/bin/sh -c &#39;&quot;&#39;&quot;&#39;chmod u+x /root/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084/ /root/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084/setup.py &amp;&amp; sleep 0&#39;&quot;&#39;&quot;&#39;&#39;</div><div>&lt;webaddress&gt; ESTABLISH SSH CONNECTION FOR USER: root</div><div>&lt;webaddress&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/lamponin/.ansible/cp/ansible-ssh-%h-%p-%r -tt webaddress&#39;/bin/sh -c &#39;&quot;&#39;&quot;&#39;/usr/bin/python /root/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084/setup.py; rm -rf &quot;/root/.ansible/tmp/ansible-tmp-1487853056.88-81930174841084/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0&#39;&quot;&#39;&quot;&#39;&#39;</div><div>ok: [webaddress]</div><div><br></div><div>TASK [Parti e configura] *******************************************************</div><div>task path: /home/lamponin/ansible/playbook/orig.testovirt_vms.yml:4</div><div>Using module file /usr/lib/python2.7/dist-packages/ansible/modules/extras/cloud/ovirt/ovirt_vms.py</div><div>&lt;webaddress&gt; ESTABLISH SSH CONNECTION FOR USER: root</div><div>&lt;webaddress&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/lamponin/.ansible/cp/ansible-ssh-%h-%p-%r webaddress&#39;/bin/sh -c &#39;&quot;&#39;&quot;&#39;( umask 77 &amp;&amp; mkdir -p &quot;` echo ~/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870 `&quot; &amp;&amp; echo ansible-tmp-1487853058.27-257942678666870=&quot;` echo ~/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870 `&quot; ) &amp;&amp; sleep 0&#39;&quot;&#39;&quot;&#39;&#39;</div><div>&lt;webaddress&gt; PUT /tmp/tmphQzpox TO /root/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870/ovirt_vms.py</div><div>&lt;webaddress&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/utente/.ansible/cp/ansible-ssh-%h-%p-%r &#39;[webaddress]&#39;</div><div>&lt;webaddress&gt; ESTABLISH SSH CONNECTION FOR USER: root</div><div>&lt;webaddress&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/utente/.ansible/cp/ansible-ssh-%h-%p-%r webaddress&#39;/bin/sh -c &#39;&quot;&#39;&quot;&#39;chmod u+x /root/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870/ /root/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870/ovirt_vms.py &amp;&amp; sleep 0&#39;&quot;&#39;&quot;&#39;&#39;</div><div>&lt;webaddress&gt; ESTABLISH SSH CONNECTION FOR USER: root</div><div>&lt;webaddress&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/utente/.ansible/cp/ansible-ssh-%h-%p-%r -tt webaddress&#39;/bin/sh -c &#39;&quot;&#39;&quot;&#39;/usr/bin/python /root/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870/ovirt_vms.py; rm -rf &quot;/root/.ansible/tmp/ansible-tmp-1487853058.27-257942678666870/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0&#39;&quot;&#39;&quot;&#39;&#39;</div><div>fatal: [webaddress]: FAILED! =&gt; {</div><div>    &quot;changed&quot;: false, </div><div>    &quot;failed&quot;: true, </div><div>    &quot;invocation&quot;: {</div><div>        &quot;module_args&quot;: {</div><div>            &quot;boot_devices&quot;: null, </div><div>            &quot;cd_iso&quot;: null, </div><div>            &quot;clone&quot;: false, </div><div>            &quot;clone_permissions&quot;: false, </div><div>            &quot;cloud_init&quot;: {</div><div>                &quot;host_name&quot;: &quot;sticameca&quot;, </div><div>                &quot;nic_boot_protocol&quot;: &quot;static&quot;, </div><div>                &quot;nic_gateway&quot;: &quot;10.x.xx.xxx&quot;, </div><div>                &quot;nic_ip_address&quot;: &quot;10.x.xx.xxx&quot;, </div><div>                &quot;nic_name&quot;: &quot;eth0&quot;, </div><div>                &quot;nic_netmask&quot;: &quot;255.255.252.0&quot;, </div><div>                &quot;nic_on_boot&quot;: true, </div><div>                &quot;root_password&quot;: &quot;stapera&quot;, </div><div>                &quot;user_name&quot;: &quot;root&quot;</div><div>            }, </div><div>            &quot;cluster&quot;: &quot;Sviluppo&quot;, </div><div>            &quot;cpu_cores&quot;: null, </div><div>            &quot;cpu_shares&quot;: null, </div><div>            &quot;cpu_sockets&quot;: null, </div><div>            &quot;delete_protected&quot;: null, </div><div>            &quot;disks&quot;: [], </div><div>            &quot;force&quot;: false, </div><div>            &quot;high_availability&quot;: true, </div><div>            &quot;host&quot;: null, </div><div>            &quot;id&quot;: null, </div><div>            &quot;memory&quot;: &quot;1GiB&quot;, </div><div>            &quot;memory_guaranteed&quot;: null, </div><div>            &quot;name&quot;: &quot;rh7conf&quot;, </div><div>            &quot;nics&quot;: [], </div><div>            &quot;operating_system&quot;: null, </div><div>            &quot;poll_interval&quot;: 3, </div><div>            &quot;state&quot;: &quot;present&quot;, </div><div>            &quot;stateless&quot;: null, </div><div>            &quot;sysprep&quot;: null, </div><div>            &quot;template&quot;: &quot;kvm73cloudinit&quot;, </div><div>            &quot;timeout&quot;: 180, </div><div>            &quot;type&quot;: null, </div><div>            &quot;wait&quot;: true</div><div>        }, </div><div>        &quot;module_name&quot;: &quot;ovirt_vms&quot;</div><div>    }, </div><div>    &quot;msg&quot;: &quot;Can&#39;t move to the next element&quot;</div><div>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>to retry, use: --limit @/home/xxxx/ansible/playbook/orig.testovirt_vms.retry</div><div><br></div><div>PLAY RECAP *********************************************************************</div><div>webaddress           : ok=1    changed=0    unreachable=0    failed=1   </div><div><br></div><div>My cm is an ubuntu server (but test centos and rhel too)</div><div>Description:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>Ubuntu 16.10</div><div>Release:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>16.10</div><div>Codename:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>yakkety</div><div><br></div><div>lamponin@ubuntu:~/ansible/playbook$ pip list | grep ovirt</div><div>DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.</div><div>ovirt-engine-sdk-python (4.1.0)</div><div>lamponin@ubuntu:~/ansible/playbook$ dpkg -l | grep python2</div><div>ii  idle-python2.7                             2.7.12-3build1                                   all          IDE for Python (v2.7) using Tkinter</div><div>ii  libpython2.7:amd64                         2.7.12-3build1                                   amd64        Shared Python runtime library (version 2.7)</div><div>ii  libpython2.7-dev:amd64                     2.7.12-3build1                                   amd64        Header files and a static library for Python (v2.7)</div><div>ii  libpython2.7-minimal:amd64                 2.7.12-3build1                                   amd64        Minimal subset of the Python language (version 2.7)</div><div>ii  libpython2.7-stdlib:amd64                  2.7.12-3build1                                   amd64        Interactive high-level object-oriented language (standard library, version 2.7)</div><div>ii  python2.7                                  2.7.12-3build1                                   amd64        Interactive high-level object-oriented language (version 2.7)</div><div>ii  python2.7-dev                              2.7.12-3build1                                   amd64        Header files and a static library for Python (v2.7)</div><div>ii  python2.7-minimal                          2.7.12-3build1                                   amd64        Minimal subset of the Python lan </div><div><br></div></div><div><br></div><div><br></div><div>Best regards Norman</div></div>