Guest User

Untitled

a guest
Feb 16th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. endpoint:
  2. esxi_hostname: servername.domain.com
  3.  
  4. - name: Create VM pysphere
  5. vmware_guest:
  6. hostname: "{{ vcenter_hostname }}"
  7. username: "{{ username }}"
  8. password: "{{ password }}"
  9. validate_certs: no
  10. datacenter: "{{ ansible_host_datacenter }}"
  11. folder: "/DCC/{{ ansible_host_datacenter }}/vm"
  12. "{{ endpoint }}"
  13. name: "{{ guest }}"
  14. state: present
  15. guest_id: "{{ osid }}"
  16. disk: "{{ disks }}"
  17. networks: "{{ niclist }}"
  18. hardware:
  19. memory_mb: "{{ memory_gb|int * 1024 }}"
  20. num_cpus: "{{ num_cpus|int }}"
  21. scsi: "{{ scsi }}"
  22. customvalues: "{{ customvalues }}"
  23. cdrom:
  24. type: client
  25. delegate_to: localhost
  26.  
  27. TASK [Preparation : Include VM tasks] *********************************************************************************************************************************************************************************
  28. fatal: [10.10.10.10]: FAILED! => {"reason": "Syntax Error while loading YAML.
  29.  
  30.  
  31. The error appears to have been in '/data01/home/hit/tools/ansible/playbooks/roles/Preparation/tasks/prepareVM.yml': line 36, column 4, but may
  32. be elsewhere in the file depending on the exact syntax problem.
  33.  
  34. The offending line appears to be:
  35.  
  36. "{{ endpoint }}"
  37. hostname: "{{ vcenter_hostname }}"
  38. ^ here
  39. We could be wrong, but this one looks like it might be an issue with
  40. missing quotes. Always quote template expression brackets when they
  41. start a value. For instance:
  42.  
  43. with_items:
  44. - {{ foo }}
  45.  
  46. Should be written as:
  47.  
  48. with_items:
  49. - "{{ foo }}"
  50.  
  51. exception type: <class 'yaml.parser.ParserError'>
  52. exception: while parsing a block mapping
  53. in "<unicode string>", line 33, column 3
  54. did not find expected key
  55. in "<unicode string>", line 36, column 4"}
Add Comment
Please, Sign In to add comment