Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
4e001fea
Commit
4e001fea
authored
Nov 12, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating help string
parent
767a13cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
playbooks/library/wait_for
+24
-9
No files found.
playbooks/library/wait_for
View file @
4e001fea
...
...
@@ -22,16 +22,20 @@ import socket
import
datetime
import
time
import
sys
import
re
DOCUMENTATION
=
'''
---
module: wait_for
short_description: Waits for a
given port to become accessible on a server
.
short_description: Waits for a
condition before continuing
.
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.
- Waiting for a port to become available 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. This module can
also be used to wait for a file to be available on the filesystem
or with a regex match a string to be present in a file.
version_added: "0.7"
options:
host:
...
...
@@ -53,14 +57,25 @@ options:
port:
description:
- port number to poll
required:
tru
e
required:
fals
e
state:
description:
- either C(present), C(started), or C(stopped)
- When checking a port C(started) will ensure the port is open, C(stopped) will check that it is closed
- When checking for a file or a search string C(present) will ensure that the file or string is present before continuing
- When checking for a file or a search string C(present)
or C(started)
will ensure that the file or string is present before continuing
choices: [ "present", "started", "stopped" ]
default: "started"
path:
version_added: "1.4"
required: false
description:
- path to a file on the filesytem that must exist before continuing
search_regex:
version_added: "1.4"
required: false
description:
- with the path option can be used match a string in the file that must match before continuing. Defaults to a multiline regex.
notes: []
requirements: []
author: Jeroen Hoekx, John Jarvis
...
...
@@ -72,10 +87,10 @@ EXAMPLES = '''
- wait_for: port=8000 delay=10"
# wait until the file /tmp/foo is present before continuing
- wait_for: path=/tmp/foo
state=present
- wait_for: path=/tmp/foo
# wait until the string "completed" is in the file /tmp/foo before continuing
- wait_for: path=/tmp/foo search_regex=completed
state=present
- wait_for: path=/tmp/foo search_regex=completed
'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment