Hi All,
I have created a playbook to execute a VBScript on windows server and its showing error while performing the syntax check. Kindly have a look and please help me in this regard.
---
- name: Copy PsExec
win_copy:src:/home/testuser/jaytest/g-prediscover.vbe
dest:C:\temp\
force:no
- name:Run powershell as a specific domain user
win_command:C:\Windows\SysWOW64\cscript.exe g-prediscover.vbe -n 2 +2
executable:C:\temp\g-prediscover.vbe
elevated:yes
nobanner:yes
interactive:yes
...
=========================
[root@Y1972-206 jaywin]# ansible-playbook -i inventory --syntax-check win3.yml
ERROR! Syntax Error while loading YAML.
could not find expected ':'
The error appears to be in '/opt/jaywin/win3.yml': line 13, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
interactive:yes
...
^ here
[root@Y1972-206 jaywin]#
=================================
Ansible version = ansible 2.8.4
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/229263b1-f69d-42da-857a-ec6c19c4060b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwOZo7yYrwQTMn4mZp_zoAqLipwKnd1qGN97_pEFZ4-e_g%40mail.gmail.com.
Hi Dick,Thanks for your mail.As per your mail I have tried the same and found the issue persist. Kindly find the details mentioned below.
[root@Y1972-206 jaywin]# cat win5.yml
---
- name: Copy PsExec
win_copy:
src: /home/testuser/jaytest/g-prediscover.vbe
dest: C:\temp\
force: no
- name: Run powershell as a specific domain user
win_command: C:\Windows\SysWOW64\cscript.exe g-prediscover.vbe -n 2 +2
executable: C:\temp\g-prediscover.vbe
elevated: yes
nobanner: yes
interactive: yes
[root@Y1972-206 jaywin]# ansible-playbook -i inventory --syntax-check win5.yml
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to be in '/opt/jaywin/win5.yml': line 10, column 15, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
win_command: C:\Windows\SysWOW64\cscript.exe g-prediscover.vbe -n 2 +2
executable: C:\temp\g-prediscover.vbe
^ here
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwMcntK8%3DtHwH7ijEG8sXW5oho3qpNSibh00wb9hP3JAqg%40mail.gmail.com.