wait_for: updated docs, must be resolvable hostname, updated example
This commit is contained in:
parent
3a02f31e34
commit
9967aa6681
1 changed files with 4 additions and 3 deletions
|
@ -54,7 +54,7 @@ version_added: "0.7"
|
||||||
options:
|
options:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- hostname or IP address to wait for
|
- A resolvable hostname or IP address to wait for
|
||||||
required: false
|
required: false
|
||||||
default: "127.0.0.1"
|
default: "127.0.0.1"
|
||||||
aliases: []
|
aliases: []
|
||||||
|
@ -123,8 +123,9 @@ EXAMPLES = '''
|
||||||
# wait until the process is finished and pid was destroyed
|
# wait until the process is finished and pid was destroyed
|
||||||
- wait_for: path=/proc/3466/status state=absent
|
- wait_for: path=/proc/3466/status state=absent
|
||||||
|
|
||||||
# Wait 300 seconds for port 22 to become open and contain "OpenSSH", don't start checking for 10 seconds
|
# wait 300 seconds for port 22 to become open and contain "OpenSSH", don't assume the inventory_hostname is resolvable
|
||||||
- local_action: wait_for port=22 host="{{ inventory_hostname }}" search_regex=OpenSSH delay=10
|
# and don't start checking for 10 seconds
|
||||||
|
- local_action: wait_for port=22 host="{{ ansible_ssh_host | default(inventory_hostname) }}" search_regex=OpenSSH delay=10
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue