You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
I just want to run my bat by raw module,like
- name:exec run.bat
raw: C:\run.bat
The bat is about a program that get logs,so it will be always running,like Daemon. When I exec ansible-playbook,the task can't go on.How can I do?
J Hawkesworth
unread,
Jul 27, 2016, 7:34:49 PM7/27/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
If it is always running then may be you need to set up whatever the run.bat does as a windows service. You can install nssm.exe and use win_nssm module to install programs as services, and then use the win_service module to start and stop them.
You can use fetch module against windows machines if you just want to fetch log files when you run your playbook too.
There are lots of programs around that can collect log files and forward them to another machine for processing. Two that I have heard of, but not used are NXLOG and Elastic Filebeat.
Hope this helps,
Jon
fcx...@gmail.com
unread,
Aug 1, 2016, 9:02:45 AM8/1/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Thanks for your answer.I am not sure whether my program is well.But I think ansible should close the task if the task exec too long.
在 2016年7月28日星期四 UTC+8上午7:34:49,J Hawkesworth写道:
J Hawkesworth
unread,
Aug 2, 2016, 1:25:29 AM8/2/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
An optional configurable timeout would be nice, but I have some tasks that run for over 60 minutes so I would not want a short default.
Can you use Remote Desktop to check if your program is well perhaps?