Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- endpoint:
- esxi_hostname: servername.domain.com
- - name: Create VM pysphere
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ username }}"
- password: "{{ password }}"
- validate_certs: no
- datacenter: "{{ ansible_host_datacenter }}"
- folder: "/DCC/{{ ansible_host_datacenter }}/vm"
- "{{ endpoint }}"
- name: "{{ guest }}"
- state: present
- guest_id: "{{ osid }}"
- disk: "{{ disks }}"
- networks: "{{ niclist }}"
- hardware:
- memory_mb: "{{ memory_gb|int * 1024 }}"
- num_cpus: "{{ num_cpus|int }}"
- scsi: "{{ scsi }}"
- customvalues: "{{ customvalues }}"
- cdrom:
- type: client
- delegate_to: localhost
- TASK [Preparation : Include VM tasks] *********************************************************************************************************************************************************************************
- fatal: [10.10.10.10]: FAILED! => {"reason": "Syntax Error while loading YAML.
- The error appears to have been in '/data01/home/hit/tools/ansible/playbooks/roles/Preparation/tasks/prepareVM.yml': line 36, column 4, but may
- be elsewhere in the file depending on the exact syntax problem.
- The offending line appears to be:
- "{{ endpoint }}"
- hostname: "{{ vcenter_hostname }}"
- ^ here
- We could be wrong, but this one looks like it might be an issue with
- missing quotes. Always quote template expression brackets when they
- start a value. For instance:
- with_items:
- - {{ foo }}
- Should be written as:
- with_items:
- - "{{ foo }}"
- exception type: <class 'yaml.parser.ParserError'>
- exception: while parsing a block mapping
- in "<unicode string>", line 33, column 3
- did not find expected key
- in "<unicode string>", line 36, column 4"}
Add Comment
Please, Sign In to add comment