Ishan,

The raw module works pretty much the same on Windows as it does on Linux - 
anything you can run on the command line can be run using the raw module. 
So, if you are wanting to use this nssm.exe rather than actually installing 
nssm, you would simply specify the path to the executable and pass whatever 
arguments it enables.

I haven't found a way to specify the AppDirectory upon creation of the 
service, so what I do is run the raw module to set that *after* the service 
has been created. For you, this might look something like this:

raw: C:\path\to\nssm.exe set [ServiceName] AppDirectory 
C:\path\to\appdirectory


Hope this helps.


-Joe

On Thursday, February 11, 2016 at 6:47:42 AM UTC-8, ishan jain wrote:
>
> Hi,
>
> I am trying to create some services on my windows machines with the help 
> of NSSM and would like to automate the process with Ansible. NSSM module 
> for ansible requires NSSM to be installed on the windows machine but i 
> cannot do that as internet is disabled on my windows machine. I want to use 
> the nssm.exe that i have copied on the remote server.
>
> How can i tell ansible to use those copied executables to run NSSM ? I 
> really need to specify the ApplicationDir, so i guess the ansible module is 
> not going to be useful for me.
>
> I think this problem will be solved via the raw module but honestly i do 
> not understand it much. Maybe because there is no proper documentation of 
> raw module for windows.
>

-- 
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/c2c632ec-0fd3-471f-91e0-3a997afb51cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to