-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_service quotes in path to handle spaces #32368
Comments
Do you need to quote the path? I've got plenty of local services where the |
In this particular case quotes are not needed but this may be needed when additional parameters are passed to the service or parameters itself should be in quotes. |
I have the same issue when I try to deploy Zabbix Agent service with the command line: "C:\Program Files\zabbix\zabbix_agentd.exe" --config "C:\Program Files\zabbix\zabbix_agentd.conf". It is standard for Windows to use quotas, while using long folder of filenames in the path. For example path to executable for the regular Microsoft service - MSSQLSERVER: Its a bug with quotes in win_service, please fix it!!! |
Thanks for the info @valerius257 and @dssdss. I suppose it is also a security risk as someone could create a malicious exe at I've raised a PR to fix this here #32469 so if you can check it out we can merge it in hopefully before 2.4.2 is out. The issue is from a change in 2.4 where parameters with a type of |
Now, it works! Thank you very much. |
Fixed has been merged to devel and cherry-picked to stable-2.4 with e771b64. Will be released under 2.4.2 beta 3 |
ISSUE TYPE
COMPONENT NAME
win_service
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible Host: CentOS 7
Managing: Windows 2012 R2
SUMMARY
win_service fails to create service when quoted path which is needed to handle spaces in path.
STEPS TO REPRODUCE
EXPECTED RESULTS
windows service created with path being in quotes
ACTUAL RESULTS
win_service failed to create service
The text was updated successfully, but these errors were encountered: