Class: Ansible::Ruby::Modules::Expect

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/extras/commands/expect.rb

Overview

The M(expect) module executes a command and responds to prompts The given command will be executed on all selected nodes. It will not be processed through the shell, so variables like C($HOME) and operations like C(“<”), C(“>”), C(“|”), and C(“&”) will not work

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

#chdirObject?

Returns cd into this directory before running the command.

Returns:

  • (Object, nil)

    cd into this directory before running the command



22
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 22

attribute :chdir

#commandString

Returns the command module takes command to run.

Returns:

  • (String)

    the command module takes command to run.



12
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 12

attribute :command

#createsObject?

Returns a filename, when it already exists, this step will B(not) be run.

Returns:

  • (Object, nil)

    a filename, when it already exists, this step will B(not) be run.



16
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 16

attribute :creates

#echoBoolean?

Returns Whether or not to echo out your response strings.

Returns:

  • (Boolean, nil)

    Whether or not to echo out your response strings



33
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 33

attribute :echo

#removesObject?

Returns a filename, when it does not exist, this step will B(not) be run.

Returns:

  • (Object, nil)

    a filename, when it does not exist, this step will B(not) be run.



19
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 19

attribute :removes

#responsesHash

Returns Mapping of expected string/regex and string to respond with. If the response is a list, successive matches return successive responses. List functionality is new in 2.1.

Returns:

  • (Hash)

    Mapping of expected string/regex and string to respond with. If the response is a list, successive matches return successive responses. List functionality is new in 2.1.



25
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 25

attribute :responses

#timeoutInteger?

Returns Amount of time in seconds to wait for the expected strings.

Returns:

  • (Integer, nil)

    Amount of time in seconds to wait for the expected strings



29
# File 'lib/ansible/ruby/modules/generated/extras/commands/expect.rb', line 29

attribute :timeout