Class: Ansible::Ruby::Modules::Wait_for
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Wait_for
- Defined in:
- lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb
Overview
You can wait for a set amount of time C(timeout), this is the default if nothing is specified. 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 regex match a string to be present in a file. In 1.6 and later, this module can also be used to wait for a file to be available or absent on the filesystem. In 1.8 and later, this module can also be used to wait for active connections to be closed before continuing, useful if a node is being rotated out of a load balancer pool.
Instance Method Summary collapse
-
#connect_timeout ⇒ Integer?
Maximum number of seconds to wait for a connection to happen before closing and retrying.
-
#delay ⇒ Integer?
Number of seconds to wait before starting to poll.
-
#exclude_hosts ⇒ Array<String>, ...
List of hosts or IPs to ignore when looking for active TCP connections for C(drained) state.
-
#host ⇒ String?
A resolvable hostname or IP address to wait for.
-
#path ⇒ String?
Path to a file on the filesytem that must exist before continuing.
-
#port ⇒ String?
Port number to poll.
-
#search_regex ⇒ String?
Can be used to match a string in either a file or a socket connection.
-
#state ⇒ :present, ...
Either C(present), C(started), or C(stopped), C(absent), or C(drained),When checking a port C(started) will ensure the port is open, C(stopped) will check that it is closed, C(drained) will check for active connections,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, C(absent) will check that file is absent or removed.
-
#timeout ⇒ Integer?
Maximum number of seconds to wait for.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#connect_timeout ⇒ Integer?
Returns maximum number of seconds to wait for a connection to happen before closing and retrying.
23 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 23 attribute :connect_timeout |
#delay ⇒ Integer?
Returns number of seconds to wait before starting to poll.
27 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 27 attribute :delay |
#exclude_hosts ⇒ Array<String>, ...
Returns list of hosts or IPs to ignore when looking for active TCP connections for C(drained) state.
47 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 47 attribute :exclude_hosts |
#host ⇒ String?
Returns A resolvable hostname or IP address to wait for.
15 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 15 attribute :host |
#path ⇒ String?
Returns path to a file on the filesytem that must exist before continuing.
39 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 39 attribute :path |
#port ⇒ String?
Returns port number to poll.
31 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 31 attribute :port |
#search_regex ⇒ String?
Returns Can be used to match a string in either a file or a socket connection. Defaults to a multiline regex.
43 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 43 attribute :search_regex |
#state ⇒ :present, ...
Returns either C(present), C(started), or C(stopped), C(absent), or C(drained),When checking a port C(started) will ensure the port is open, C(stopped) will check that it is closed, C(drained) will check for active connections,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, C(absent) will check that file is absent or removed.
35 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 35 attribute :state |
#timeout ⇒ Integer?
Returns maximum number of seconds to wait for.
19 |
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 19 attribute :timeout |