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

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

Overview

The M(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(“|”), and C(“&”) will not work (use the M(shell) module if you need these features).

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



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

attribute :chdir

#createsString?

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

Returns:

  • (String, nil)

    a filename or (since 2.0) glob pattern, when it already exists, this step will B(not) be run.



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

attribute :creates

#executableObject?

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

Returns:

  • (Object, nil)

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



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

attribute :executable

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



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

attribute :free_form

#removesObject?

Returns a filename or (since 2.0) glob pattern, when it does not exist, this step will B(not) be run.

Returns:

  • (Object, nil)

    a filename or (since 2.0) glob pattern, when it does not exist, this step will B(not) be run.



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

attribute :removes

#warnBoolean?

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

Returns:

  • (Boolean, nil)

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



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

attribute :warn