Commit 22a46c15 by John Jarvis

delay_after set to an integer

parent 7ba423af
...@@ -60,6 +60,13 @@ options: ...@@ -60,6 +60,13 @@ options:
poll for the port being open or closed. poll for the port being open or closed.
choices: [ "started", "stopped" ] choices: [ "started", "stopped" ]
default: "started" default: "started"
delay_after:
version_added: "1.4"
description:
- number of seconds to wait after the poll
required: false
default: 0
notes: [] notes: []
requirements: [] requirements: []
author: Jeroen Hoekx author: Jeroen Hoekx
...@@ -80,7 +87,7 @@ def main(): ...@@ -80,7 +87,7 @@ def main():
delay=dict(default=0), delay=dict(default=0),
port=dict(required=True), port=dict(required=True),
state=dict(default='started', choices=['started', 'stopped']), state=dict(default='started', choices=['started', 'stopped']),
delay_after=dict(default=None), delay_after=dict(default=0),
), ),
) )
...@@ -92,7 +99,7 @@ def main(): ...@@ -92,7 +99,7 @@ def main():
delay = int(params['delay']) delay = int(params['delay'])
port = int(params['port']) port = int(params['port'])
state = params['state'] state = params['state']
delay_after = params['delay_after'] delay_after = int(params['delay_after'])
start = datetime.datetime.now() start = datetime.datetime.now()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment