Module DOCUMENTATION for template, wait_for, and yum

This commit is contained in:
Jan-Piet Mens
2012-09-29 00:49:02 +02:00
parent 6bbaa26f64
commit a040807fd0
4 changed files with 121 additions and 1 deletions

View File

@@ -23,6 +23,51 @@ import datetime
import time
import sys
DOCUMENTATION = '''
---
module: wait_for
short_description: Waits for a given port to become accessible on a server.
description:
- This is useful for when services are not immediately available after
their init scripts return - which is true of certain Java application
servers. It is also useful when starting guests with the M(virt) module and
needing to pause until they are ready.
version_added: "0.7"
options:
host:
description:
- hostname or IP address to wait for
required: false
default: "127.0.0.1"
aliases: []
timeout:
description:
- maximum number of seconds to wait for
required: false
default: 300
delay:
description:
- number of seconds to wait before starting to poll
required: false
default: 0
port:
description:
- port number to poll
required: true
state:
description:
- either C(started), or C(stopped) depending on whether the module should
poll for the port being open or closed.
choices: [ "started", "stopped" ]
default: "started"
examples:
- code: wait_for port=8000 delay=10
description: "Example from Ansible Playbooks"
notes: []
requirements: null
author: Jeroen Hoekx
'''
def main():
module = AnsibleModule(