Created
March 12, 2018 18:37
-
-
Save metabsd/43e7a593f1b463767c63527f30aead37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks: | |
- name: add a new disk on guest vm | |
vmware_guest: | |
hostname: "{{ vcenter_hostname }}" | |
user: "{{ vcenter_username }}" | |
password: "{{ vcenter_password }}" | |
datacenter: "{{ vcenter_datacenter }}" | |
cluster: "{{ vcenter_cluster }}" | |
guest_id: "rhel7_64Guest" | |
validate_certs: False | |
state: present | |
name: "{{ ansible_nodename }}" | |
disk: | |
- size_gb: 32G | |
autoselect_datastore: True | |
delegate_to: localhost | |
But I have this message: | |
fatal: [servername -> localhost]: FAILED! => { | |
"changed": false, | |
"invocation": { | |
"module_args": { | |
"annotation": null, | |
"cluster": "cluster", | |
"customization": {}, | |
"customvalues": [], | |
"datacenter": "datacenter", | |
"disk": [ | |
{ | |
"autoselect_datastore": true, | |
"size_gb": "32G" | |
} | |
], | |
"esxi_hostname": null, | |
"folder": "/vm", | |
"force": false, | |
"guest_id": "rhel7_64Guest", | |
"hardware": {}, | |
"hostname": "vcenter.domain", | |
"is_template": false, | |
"linked_clone": false, | |
"name": "servername", | |
"name_match": "first", | |
"networks": [], | |
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", | |
"resource_pool": null, | |
"snapshot_src": null, | |
"state": "present", | |
"template": null, | |
"user": "VSPHERE.LOCAL\\username", | |
"username": "VSPHERE.LOCAL\\username", | |
"uuid": null, | |
"validate_certs": false, | |
"wait_for_ip_address": false | |
} | |
}, | |
"msg": "hardware.num_cpus attribute is mandatory for VM creation" | |
} | |
to retry, use: --limit @/home/svc_ansible/Ansible/SAQ/Base/playbooks/preparation_webmethod10.retry | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment