Thanks Joe,

I tried using the raw module but the problem i am facing is that NSSM 
requires admin level privileges to start/stop services. How can i enable 
'Run as admin' level while passing a command in NSSM ? My windows machine 
do not have a pre installed NSSM and thus i cannot create a service with 
raw and then start it with the module later on.

On Thursday, 11 February 2016 20:46:25 UTC+5:30, Joe Levis wrote:
>
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0077a36f-cf70-486b-8ce9-c5304992529f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to