Class: Ansible::Ruby::Modules::Wait_for

Inherits:
Base show all
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

Methods inherited from Base

#ansible_name, #to_h

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_timeoutInteger?

Returns maximum number of seconds to wait for a connection to happen before closing and retrying.

Returns:

  • (Integer, nil)

    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

#delayInteger?

Returns number of seconds to wait before starting to poll.

Returns:

  • (Integer, nil)

    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_hostsArray<String>, ...

Returns list of hosts or IPs to ignore when looking for active TCP connections for C(drained) state.

Returns:

  • (Array<String>, String, nil)

    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

#hostString?

Returns A resolvable hostname or IP address to wait for.

Returns:

  • (String, nil)

    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

#pathString?

Returns path to a file on the filesytem that must exist before continuing.

Returns:

  • (String, nil)

    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

#portString?

Returns port number to poll.

Returns:

  • (String, nil)

    port number to poll



31
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 31

attribute :port

#search_regexString?

Returns Can be used to match a string in either a file or a socket connection. Defaults to a multiline regex.

Returns:

  • (String, nil)

    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.

Returns:

  • (:present, :started, :stopped, :absent, :drained, nil)

    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

#timeoutInteger?

Returns maximum number of seconds to wait for.

Returns:

  • (Integer, nil)

    maximum number of seconds to wait for



19
# File 'lib/ansible/ruby/modules/generated/core/utilities/logic/wait_for.rb', line 19

attribute :timeout