<div dir="ltr">You are absolutely right Ondra. Thank You<br><div><br></div><div>I have three questions for you:<br></div><div><br></div><div>1) How does this work ? Ansible creates the configuration disk?</div><div><br></div><div>2) How can I do to disable cloud-init after execution, maybe a script that runs systemd disable cloud-init.service and systemd mask cloud-init.service. There is little documentation about it</div><div><br></div><div>3) If you would like to turn off or on a huge set of virtual machines how you can group them to do so. Without having to do a Task for each one</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-11 4:25 GMT-05:00 Ondra Machacek <span dir="ltr"><<a href="mailto:omachace@redhat.com" target="_blank">omachace@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, Sep 9, 2017 at 2:02 AM, Julián Tete <<a href="mailto:danteconrad14@gmail.com">danteconrad14@gmail.com</a>> wrote:<br>
> oVirt Version: 4.1.5<br>
><br>
> Ansible: 2.3.1<br>
><br>
> Hello Friends of oVirt<br>
><br>
> I want to automate the creation, provisioning and deployment of virtual<br>
> machines in oVirt, using Ansible.<br>
><br>
> I want to use a non-cloud image for the template. It has cloud-init<br>
> installed. And it looks for the IP http: //169.254.169 and the following<br>
> error message: "Calling 'http: //169.254.169 ....."<br>
><br>
> It looks like oVirt uses a config drive with a user-data.txt file<br>
><br>
> This is my Ansible Playbook:<br>
><br>
> ---<br>
> # Primer Play<br>
> - hosts: oVirtEnginePruebas<br>
> remote_user: root<br>
> tasks:<br>
> - name : Definiendo la conexion con el Engine de oVirt<br>
> ovirt_auth:<br>
> url: <a href="https://engine1.example.com/ovirt-engine/api" rel="noreferrer" target="_blank">https://engine1.example.com/<wbr>ovirt-engine/api</a><br>
> username: admin@internal<br>
> password: mysupersecretpassword<br>
> ca_file: /etc/pki/ovirt-engine/ca.pem<br>
><br>
> - name : Creando la maquina virtual requerida<br>
> ovirt_vms:<br>
> auth: "{{ ovirt_auth }}"<br>
> state: present<br>
> name: CentOS7CloudInit<br>
> template: CloudInitTemplate<br>
> cluster: Default<br>
<br>
</div></div>Why you need this? I think you can remove and use just the task below.<br>
<span class=""><br>
><br>
> - name : Se establecen las propiedades de la maquina virtual y los<br>
> parametros de cloud-init<br>
> ovirt_vms:<br>
> auth: "{{ ovirt_auth }}"<br>
> name: CentOS7CloudInit<br>
> template: CloudInitTemplate<br>
> cluster: Default<br>
> memory: 5GiB<br>
> cpu_cores: 8<br>
> high_availability: true<br>
> cloud_init:<br>
> host_name: <a href="http://cloudinit.example.com" rel="noreferrer" target="_blank">cloudinit.example.com</a><br>
> nic_name: eth0<br>
> nic_boot_protocol: static<br>
> nic_ip_address: 192.168.0.238<br>
> nic_netmask: 255.255.255.0<br>
> nic_gateway: 192.168.0.1<br>
> dns_servers: 8.8.8.8<br>
> dns_search: <a href="http://example.com" rel="noreferrer" target="_blank">example.com</a><br>
> nic_on_boot: true<br>
> user_name: root<br>
> root_password: mysupersecretpassword<br>
<br>
</span>This looks OK, and should work, what is the issue you have?<br>
<span class=""><br>
><br>
> - name : Desconectando con el Engine de oVirt revocando el token SSO<br>
> ovirt_auth:<br>
> state: absent<br>
> ovirt_auth: "{{ ovirt_auth }}"<br>
> ~<br>
><br>
><br>
> I just want to use Ansible for this, I do not want to use the oVirt<br>
> webinterface to run run once every time I want to provision a machine.<br>
><br>
> How can I do that ?<br>
><br>
> Thanks in advance<br>
><br>
</span>> ______________________________<wbr>_________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
><br>
</blockquote></div><br></div>