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

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

Overview

The C(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, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#chdirObject?

Returns Change into this directory before running the command.

Returns:

  • (Object, nil)

    Change into this directory before running the command.



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

attribute :chdir

#commandString

Returns The command module takes command to run.

Returns:

  • (String)

    The command module takes command to run.



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

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.



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

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.



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

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.



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

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.



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

attribute :responses

#timeoutInteger?

Returns Amount of time in seconds to wait for the expected strings. Use C(null) to disable timeout.

Returns:

  • (Integer, nil)

    Amount of time in seconds to wait for the expected strings. Use C(null) to disable timeout.



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

attribute :timeout