Sorry, I didn't understand properly.
You want to convert a template to a VM.
Can't do that with vmware_guest.
To do that, I'm using a Powercli script executed by Ansible.
Le mardi 20 mars 2018 17:13:42 UTC+1, Sebastien Desbois a écrit :
>
> Hello,
>
> It is possible.
> Seems that you are missing a few parameters
>
> Here is an example of task that can work: (the
> tasks:
> - name: Create VM from template
> vmware_guest:
> hostname: "{{vcenter_IP}}"
> username: "{{vcenter_user}}"
> password: "{{vcenter_pass}}"
> validate_certs: no
> datacenter: "{{vcenter_datacenter}}"
> cluster: "{{vcenter_cluster}}"
> resource_pool: "{{ vcenter_resource_pool }}"
> folder: "{{folder}}"
> name: "{{hostname}}"
> state: poweredoff
> template: "{{template}}"
> hardware:
> memory_mb: "{{ram}}"
> num_cpus: "{{vcpu}}"
>
>
> What are the error messages you have ?
>
>
> Le dimanche 18 mars 2018 11:48:25 UTC+1, olivier pouilly a écrit :
>>
>> Hi all,
>>
>> I tried to convert my template to a VM.
>> I created a playbook to do that but when I play the playbook it, It don't
>> work:
>>
>> - hosts: all
>> gather_facts: false
>> connection: local
>> tasks:
>> - name: Create a VM template
>> vmware_guest: hostname=192.168.0.1 username=usernme password=password
>> validate_certs=no datacenter='Datacenter' esxi_hostname='esx' name='VM'
>> is_template=no
>>
>> I wonder if this is possible. Do you have any idea ?
>>
>> Best regards,
>>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4a48edfc-85b2-4456-8863-428abe63dcaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.