Use https://onlineyamltools.com/validate-yaml
This will help you validate the syntax On Saturday, April 18, 2020 at 2:26:10 PM UTC-7, Tony Wong wrote: > > this is what i have. but still not working > > On Sat, Apr 18, 2020 at 1:55 PM David Foley <[email protected] > <javascript:>> wrote: > >> Why Aren't you using your Local Machine using Atom or VS Code to build >> your Yaml files then using WinSCP copy the playbooks over ? >> >> On Saturday, April 18, 2020 at 9:43:00 PM UTC+1, Tony Wong wrote: >>> >>> what editor can i use on my ubuntu box? I cant use anything other than >>> vim. >>> >>> >>> still getting the error. >>> >>> tony@ubuntu:~/ansiblework$ ansible-playbook info.yml >>> [WARNING]: provided hosts list is empty, only localhost is available. >>> Note that the implicit localhost does not match 'all' >>> >>> ERROR! Syntax Error while loading YAML. >>> mapping values are not allowed in this context >>> >>> The error appears to be in '/home/tony/ansiblework/info.yml': line 3, >>> column 8, but may >>> be elsewhere in the file depending on the exact syntax problem. >>> >>> The offending line appears to be: >>> >>> name: get info vm >>> hosts: localhost >>> ^ here >>> >>> On Sat, Apr 18, 2020 at 1:26 PM David Foley <[email protected]> wrote: >>> >>>> --- >>>> - name: get info vm >>>> hosts: localhost >>>> connection: local >>>> gather_facts: false >>>> tasks: >>>> - name: get info about the virtual machine >>>> vmware_guest_info: >>>> hostname: vcnerter >>>> username: >>>> password: xxxxxxxx >>>> datacenter: DC >>>> validate_certs: False >>>> name: myvm >>>> schema: "vsphere" >>>> properties: ["config.hardware.memoryMB", "guest.disk", >>>> "overallStatus"] >>>> delegate_to: localhost >>>> register: info >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ansible Project" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/ansible-project/3000e6a2-0db0-4bd5-8fba-ec114f5240e4%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/ansible-project/3000e6a2-0db0-4bd5-8fba-ec114f5240e4%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/672cc33a-758f-4083-a48b-0882cb11e453%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/672cc33a-758f-4083-a48b-0882cb11e453%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d173cf22-37f8-4b7f-9e08-f2813ed4b5f2%40googlegroups.com.
