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
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
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.
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
ESTABLISH LOCAL CONNECTION FOR USER: vagrant
EXEC /bin/sh -c ‘echo ~ && sleep 0’
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’
PUT /tmp/tmpFVfBUg TO
/home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware_guest.py
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’
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.retryPLAY RECAP **********************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1How should I solve this please?
My playbook;
- hosts: localhost
connection: local
become: true
become_user: root
gather_facts: notasks:
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: yesBest 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.
Hello daniel,
Thank you.
I checked that comment.
Tk,