> I'm not sure if there is a difference in vmware_guest module for Tower or 
with versions. 

If the output is the same between Ansible Engine and Ansible Tower, then 
that would be my first though.  Check the versions Tower and your test 
system are using and make sure Tower is the same version.


On Friday, February 21, 2020 at 5:58:21 PM UTC-6, Sindhu Rao wrote:
>
> I'm building a VM on Vcenter with a playbook that runs fine and creates a 
> VM when executed from the Ansible server but fails to create a VM when the 
> same playbook is executed from ANsible Tower.
> I do not see any syntax errors and I see the same job output on both the 
> Ansible server and on Ansible Tower. I'm not sure if there is a difference 
> in vmware_guest module for Tower or with versions. 
>
> My playbook is
> ---
>     - name: Create a VM
>       vmware_guest:
>         hostname: "{{ hostname_esxi }}"
>         username: ansible.pfshq.com
>         password: #####
>         validate_certs: False
>
>         datacenter: "{{ datacenter }}"
>
>         resource_pool: "{{ resource_pool_esxi }}"
>         cluster: "{{ cluster_esxi }}"
>         guest_id: "{{ guest_id }}"
>         folder: "/{{ datacenter }}/vm"
>         state: poweredon
>         annotation: "{{ annotation }}"
> # hostname gets passed in command line as extra arguments -e 
> hostname=xxxxxxx
>         name: "{{ hostname }}"
>         hardware:
>           memory_mb: "{{ memory_esxi }}"
>           num_cpus: "{{ cpu_esxi }}"
>           scsi: "{{ scsi_esxi }}"
>         wait_for_ip_address: yes
>         disk:
>         - size_gb: "{{ disk_size_1 }}"
>           type: "{{ disk_type }}"
>   
>           datastore: "{{ datastore_cluster_1 }}"
>         - size_gb: "{{ disk_size_2 }}"
>           type: "{{ disk_type }}"
>
>           datastore: "{{ datastore_cluster_2 }}"
>         networks:
>         - name: "{{ network_name }}"
>           domain: "{{ domain }}"
>           device_type: "{{ device_type }}"
>           dns_servers:
>           - "{{ dns1 }}"
>           - "{{ dns2 }}"
>       delegate_to: localhost
>       register: VM
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a9d9497e-63ea-4e1b-924c-856d46ac478b%40googlegroups.com.

Reply via email to