Class: Ansible::Ruby::Modules::Shell

Inherits:
Base show all
Includes:
FreeForm
Defined in:
lib/ansible/ruby/modules/generated/commands/shell.rb,
lib/ansible/ruby/modules/custom/commands/shell.rb

Overview

The C(shell) module takes the command name followed by a list of space-delimited arguments. It is almost exactly like the M(command) module but runs the command through a shell (C(/bin/sh)) on the remote node. For Windows targets, use the M(win_shell) module instead.

Instance Method Summary collapse

Methods included from FreeForm

included, #to_h

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

#chdirString?

Returns cd into this directory before running the command.

Returns:

  • (String, nil)

    cd into this directory before running the command



24
# File 'lib/ansible/ruby/modules/generated/commands/shell.rb', line 24

attribute :chdir

#createsString?

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

Returns:

  • (String, nil)

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



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

attribute :creates

#executableString?

Returns change the shell used to execute the command. Should be an absolute path to the executable.

Returns:

  • (String, nil)

    change the shell used to execute the command. Should be an absolute path to the executable.



28
# File 'lib/ansible/ruby/modules/generated/commands/shell.rb', line 28

attribute :executable

#free_formObject

Returns The shell module takes a free form command to run, as a string. There’s not an actual option named “free form”. See the examples!.

Returns:

  • (Object)

    The shell module takes a free form command to run, as a string. There’s not an actual option named “free form”. See the examples!



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

attribute :free_form

#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.



21
# File 'lib/ansible/ruby/modules/generated/commands/shell.rb', line 21

attribute :removes

#stdinObject?

Returns Set the stdin of the command directly to the specified value.

Returns:

  • (Object, nil)

    Set the stdin of the command directly to the specified value.



36
# File 'lib/ansible/ruby/modules/generated/commands/shell.rb', line 36

attribute :stdin

#warn:yes, ...

Returns if command warnings are on in ansible.cfg, do not warn about this particular line if set to no/false.

Returns:

  • (:yes, :no, nil)

    if command warnings are on in ansible.cfg, do not warn about this particular line if set to no/false.



32
# File 'lib/ansible/ruby/modules/generated/commands/shell.rb', line 32

attribute :warn