Move comments to the documentation

This commit is contained in:
gfrank 2015-08-20 13:57:03 -04:00
parent 9d68a1746f
commit b75f7cc22b
2 changed files with 6 additions and 9 deletions

View file

@ -40,10 +40,6 @@ If ($params.state)
$state = $params.state.ToString().ToLower() $state = $params.state.ToString().ToLower()
$validStates = "present", "absent", "started", "stopped", "restarted" $validStates = "present", "absent", "started", "stopped", "restarted"
# These don't really fit the declarative style of ansible
# If you need to do these things, you can just write a command for it
# "paused", "continued", "rotated"
If ($validStates -notcontains $state) If ($validStates -notcontains $state)
{ {
Fail-Json $result "state is $state; must be one of: $validStates" Fail-Json $result "state is $state; must be one of: $validStates"
@ -138,11 +134,6 @@ Function Nssm-Install
[string]$application [string]$application
) )
#note: the application name must look like the following, if the directory includes spaces:
# nssm install service "c:\Program Files\app.exe" """C:\Path with spaces"""
#see https://git.nssm.cc/?p=nssm/nssm.git;a=commit;h=0b386fc1984ab74ee59b7bed14b7e8f57212c22b for more info
if (!$application) if (!$application)
{ {
Throw "Error installing service ""$name"". No application was supplied." Throw "Error installing service ""$name"". No application was supplied."

View file

@ -39,8 +39,10 @@ options:
state: state:
description: description:
- State of the service on the system - State of the service on the system
- Note that NSSM actions like "pause", "continue", "rotate" do not fit the declarative style of ansible, so these should be implemented via the ansible command module
required: false required: false
choices: choices:
- present
- started - started
- stopped - stopped
- restarted - restarted
@ -50,6 +52,10 @@ options:
application: application:
description: description:
- The application binary to run as a service - The application binary to run as a service
- Specify this whenever the service may need to be installed (state: present, started, stopped, restarted)
- Note that the application name must look like the following, if the directory includes spaces:
- nssm install service "c:\Program Files\app.exe" """C:\Path with spaces"""
- See commit 0b386fc1984ab74ee59b7bed14b7e8f57212c22b in the nssm.git project for more info (https://git.nssm.cc/?p=nssm.git;a=commit;h=0b386fc1984ab74ee59b7bed14b7e8f57212c22b)
required: false required: false
default: null default: null