Guest User

Untitled

a guest
Mar 21st, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. tasks:
  2. - name: add a new disk on guest vm
  3. vmware_guest:
  4. hostname: "{{ vcenter_hostname }}"
  5. user: "{{ vcenter_username }}"
  6. password: "{{ vcenter_password }}"
  7. datacenter: "{{ vcenter_datacenter }}"
  8. cluster: "{{ vcenter_cluster }}"
  9. guest_id: "rhel7_64Guest"
  10. validate_certs: False
  11. state: present
  12. name: "{{ ansible_nodename }}"
  13. disk:
  14. - size_gb: 32G
  15. autoselect_datastore: True
  16. delegate_to: localhost
  17.  
  18.  
  19. But I have this message:
  20.  
  21. fatal: [servername -> localhost]: FAILED! => {
  22. "changed": false,
  23. "invocation": {
  24. "module_args": {
  25. "annotation": null,
  26. "cluster": "cluster",
  27. "customization": {},
  28. "customvalues": [],
  29. "datacenter": "datacenter",
  30. "disk": [
  31. {
  32. "autoselect_datastore": true,
  33. "size_gb": "32G"
  34. }
  35. ],
  36. "esxi_hostname": null,
  37. "folder": "/vm",
  38. "force": false,
  39. "guest_id": "rhel7_64Guest",
  40. "hardware": {},
  41. "hostname": "vcenter.domain",
  42. "is_template": false,
  43. "linked_clone": false,
  44. "name": "servername",
  45. "name_match": "first",
  46. "networks": [],
  47. "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
  48. "resource_pool": null,
  49. "snapshot_src": null,
  50. "state": "present",
  51. "template": null,
  52. "user": "VSPHERE.LOCAL\\username",
  53. "username": "VSPHERE.LOCAL\\username",
  54. "uuid": null,
  55. "validate_certs": false,
  56. "wait_for_ip_address": false
  57. }
  58. },
  59. "msg": "hardware.num_cpus attribute is mandatory for VM creation"
  60. }
  61. to retry, use: --limit @/home/svc_ansible/Ansible/SAQ/Base/playbooks/preparation_webmethod10.retry
Add Comment
Please, Sign In to add comment