Hello All--
I'm trying to get a couple of jars up and running in the background on some
Windows machines. My expected result is at the end of the play I have both
jars running with logs for both, and they're listening on ports 4444 and
24240 respectively. Here's my tasks:
- raw: Start-Process javaw -ArgumentList '-jar
C:\Users\Administrator\mySweetJar.jar'
- raw: Start-Process javaw -ArgumentList
'-Dwebdriver.chrome.driver=C:\Windows\System32\chromedriver.exe
-jar C:\selenium.jar -browserSessionReuse -browserTimeout 300 -timeout
300000 -maxSession 1 -log C:\Users\Administrator\node.log'
What actually happens is that Ansible reports the commands running
successfully:
TASK [Starting MySweetJar...]
****************************************************
task path: /Users/allen.fisher/projects/setup-windows-SUT/playbook.yml:61
<XX.XX.XX.XX> ESTABLISH WINRM CONNECTION FOR USER: administrator on PORT
5985 TO XX.XX.XX.XX
<XX.XX.XX.XX> EXEC Start-Process javaw -ArgumentList '-jar
C:\Users\Administrator\MySweetJar.jar'
ok: [XX.XX.XX.XX] => {"changed": false, "invocation": {"module_args": {
"_raw_params": "Start-Process javaw -ArgumentList '-jar
C:\\Users\\Administrator\\MySweetJar.jar'"}, "module_name": "raw"}, "rc": 0,
"stderr": "", "stdout": "", "stdout_lines": []}
TASK [Starting Selenium...]
****************************************************
task path: /Users/allen.fisher/projects/setup-windows-SUT/playbook.yml:63
<XX.XX.XX.XX> ESTABLISH WINRM CONNECTION FOR USER: administrator on PORT
5985 TO XX.XX.XX.XX
<XX.XX.XX.XX> EXEC Start-Process javaw -ArgumentList
'-Dwebdriver.chrome.driver=C:\Windows\System32\chromedriver.exe
-jar C:\selenium.jar -browserSessionReuse -browserTimeout 300 -timeout
300000 -maxSession 1 -log C:\Users\Administrator\node.log'
ok: [XX.XX.XX.XX] => {"changed": false, "invocation": {"module_args": {
"_raw_params": "Start-Process javaw -ArgumentList
'-Dwebdriver.chrome.driver=C:\\Windows\\System32\\chromedriver.exe -jar
C:\\selenium.jar -browserSessionReuse -browserTimeout 300 -timeout 300000
-maxSession 1 -log C:\\Users\\Administrator\\node.log'"}, "module_name":
"raw"}, "rc": 0, "stderr": "", "stdout": "", "stdout_lines": []}
But the ports are not open, and there are no logs so it's almost like
Ansible is killing the process before it even gets going.
The commands run as I would expect on the box directly. I've tried bundling
them into a PowerShell script and using the script module to execute the
commands, I've tried both java.exe and javaw.exe with no success. Does
anyone have a way to accomplish what I'm after?
Thanks, Allen
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1536413f-1566-4e67-a6b5-7ff3d7885224%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.