Class: Ansible::Ruby::Modules::Command

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

Overview

The C(command) module takes the command name followed by a list of space-delimited arguments. 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(“|”), C(“;”) and C(“&”) will not work (use the M(shell) module if you need these features). For Windows targets, use the M(win_command) 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

#argvArray<String>, ...

Returns Allows the user to provide the command as a list vs. a string. Only the string or the list form can be provided, not both. One or the other must be provided.

Returns:

  • (Array<String>, String, nil)

    Allows the user to provide the command as a list vs. a string. Only the string or the list form can be provided, not both. One or the other must be provided.



18
# File 'lib/ansible/ruby/modules/generated/commands/command.rb', line 18

attribute :argv

#chdirString?

Returns Change into this directory before running the command.

Returns:

  • (String, nil)

    Change into this directory before running the command.



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

attribute :chdir

#createsString?

Returns A filename or (since 2.0) glob pattern. If it already exists, this step B(won’t) be run.

Returns:

  • (String, nil)

    A filename or (since 2.0) glob pattern. If it already exists, this step B(won’t) be run.



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

attribute :creates

#free_formObject

Returns The command module takes a free form command to run. There is no parameter actually named ‘free form’. See the examples!.

Returns:

  • (Object)

    The command module takes a free form command to run. There is no parameter actually named ‘free form’. See the examples!



14
# File 'lib/ansible/ruby/modules/generated/commands/command.rb', line 14

attribute :free_form

#removesObject?

Returns A filename or (since 2.0) glob pattern. If it already exists, this step B(will) be run.

Returns:

  • (Object, nil)

    A filename or (since 2.0) glob pattern. If it already exists, this step B(will) be run.



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

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.



37
# File 'lib/ansible/ruby/modules/generated/commands/command.rb', line 37

attribute :stdin

#warn:yes, ...

Returns If command_warnings are on in ansible.cfg, do not warn about this particular line if set to C(no).

Returns:

  • (:yes, :no, nil)

    If command_warnings are on in ansible.cfg, do not warn about this particular line if set to C(no).



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

attribute :warn