It's best to use key: value syntax when working with Windows paths, rather than the key=value style.
Generally, for hard coded windows paths they will work fine if you use key: value and enter the path in single quotes.
Hope this helps,
Jon
- hosts: nuc
tasks:
- name: run simple script
script: C:\Users\YRunner\Desktop\lp1.bat
HI Jordan,Thanks for your help.I've got it running now successfully. I have copied over a bat file successfully several times.Now, my next step is trying to get the batch files to run via ansible.This is my play:---
- hosts: nuc
- name: run simple script
script: C:\Users\YRunner\Desktop\lp1.bat
When I run it I get:
root@Raspi_Ctrl:/ansible# ansible-playbook /ansible/playbook/test1.yml
ERROR! 'script' is not a valid attribute for a Play
The error appears to have been in '/ansible/playbook/test1.yml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- hosts: nuc
- name: run simple script
^ here
So obv. That means I am using the wrong command. What is the right one?
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/XEh1Fg3D9wE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a99e8e5c-56fa-4ae2-80ab-16bafbaca778%40googlegroups.com.--Thank you,Larry PescatoreLab Engineer, ERG Inc. @ Google