Hello daniel,
Thank you.

I checked that comment.


Tk,


2017-02-13 22:31 GMT+09:00  <[email protected]>:
> https://github.com/ansible/ansible/commit/239c6aee35f3abcd52abf2c6497b75356002dd14
>
> These changes appear to have broken the ability to deploy via this module. I
> am getting the following error after this commit:
>
> fatal: [vm01]: FAILED! => {"changed": false, "failed": true, "msg": "Module
> alias error: internal error: required and default are mutually exclusive for
> datacenter"}
>
> Backing out this change has restored functionality.
>
>
> On Monday, February 13, 2017 at 2:21:39 AM UTC, Takeshi Kuramochi wrote:
>>
>> Hi all,
>>
>> I use ansible v2.3.
>>
>> when I tried to create from vm template by using vmware_guest module,
>> I saw an internal error below;
>>
>>
>> PLAYBOOK: vm.yml
>>
>> ****************************************************************************************************************************************
>> 1 plays in vm.yml
>>
>> PLAY [localhost]
>>
>> ****************************************************************************************************************************************
>> META: ran handlers
>>
>> TASK [create the VM]
>>
>> ************************************************************************************************************************************
>> task path: /home/vagrant/vmware_deploy/vm.yml:9
>> Using module file
>> /usr/local/ansible/lib/ansible/modules/cloud/vmware/vmware_guest.py
>> <localhost> ESTABLISH LOCAL CONNECTION FOR USER: vagrant
>> <localhost> EXEC /bin/sh -c 'echo ~ && sleep 0'
>> <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo
>> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301
>> `" && echo ansible-tmp-1486952035.63-258723752885301="` echo
>> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301
>> `" ) && sleep 0'
>> <localhost> PUT /tmp/tmpFVfBUg TO
>>
>> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware_guest.py
>> <localhost> EXEC /bin/sh -c 'chmod u+x
>> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/
>>
>> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware_guest.py
>> && sleep 0'
>> <localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c
>> '"'"'echo BECOME-SUCCESS-ixxjesnouwewkoeaywbpuqolwknoptby;
>> /usr/bin/python
>>
>> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware_guest.py;
>> rm -rf
>> "/home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/"
>> > /dev/null 2>&1'"'"' && sleep 0'
>> fatal: [localhost]: FAILED! => {
>>     "changed": false,
>>     "failed": true,
>>     "msg": "Module alias error: internal error: required and default
>> are mutually exclusive for datacenter"
>> }
>>         to retry, use: --limit @/home/vagrant/vmware_deploy/vm.retry
>>
>> PLAY RECAP
>> **********************************************************************************************************************************************
>> localhost                  : ok=0    changed=0    unreachable=0
>> failed=1
>>
>>
>> How should I solve this please?
>>
>>
>> My playbook;
>>
>> - hosts: localhost
>>   connection: local
>>   become: true
>>   become_user: root
>>   gather_facts: no
>>
>>   tasks:
>>     # Create a VM from a template
>>     - name: create the VM
>>       vmware_guest:
>>         hostname: 192.168.0.11
>>         username: root
>>         password: vmware
>>         validate_certs: no
>>         esxi_hostname: 192.168.0.12
>>         datacenter: "TK"
>>         folder: MyMachines
>>         name: testvm_cent7_001
>>         state: poweredon
>>         guest_id: centos64guest
>>         disk:
>>         - size_gb: 10
>>           type: thin
>>           datastore: SSD-250
>>         hardware:
>>           memory_mb: 1024
>>           num_cpus: 2
>>           scsi: paravirtual
>>         networks:
>>         - name: VM Network
>>           ip: 192.168.0.25
>>           netmask: 255.255.255.0
>>           mac: 'aa:bb:dd:aa:00:14'
>>         template: "temp_centos7"
>>         wait_for_ip_address: yes
>>
>>
>> Best Regards,
>>
>>
>> Tk
>
>
> This e-mail is for the sole attention of the identified addressee(s). Access
> to this email by anyone else is unauthorised. The contents of this e-mail
> and any attachments are confidential and for informational purposes only and
> may be subject to legal privilege. If you are not the intended recipient or
> have received this e-mail in error, you must not copy, distribute, publish,
> rely on or otherwise use it without the sender’s consent.
>
> Please delete this e-mail and any attachments immediately (without retaining
> any copies), notifying the sender by return e-mail. The sender makes no
> warranty or representation as to the accuracy and completeness of any
> information contained in this e-mail or attachments and does not accept
> liability for any errors or omissions.
>
> This e-mail has originated from a member of the Hertshten Group Limited
> group of companies.
>
> --
> 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/c2d1714a-c0e4-43ca-8013-797925b438c0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAOpn5sT5Z-xmRAjG_f%3DiC-Dne%3Dg1OXGi0W-cwEbg72dW-zZ8Lw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to