Class: Ansible::Ruby::Modules::Command
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Command
- 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
-
#argv ⇒ Array<String>, ...
Allows the user to provide the command as a list vs.
-
#chdir ⇒ String?
Change into this directory before running the command.
-
#creates ⇒ String?
A filename or (since 2.0) glob pattern.
-
#free_form ⇒ Object
The command module takes a free form command to run.
-
#removes ⇒ Object?
A filename or (since 2.0) glob pattern.
-
#stdin ⇒ Object?
Set the stdin of the command directly to the specified value.
-
#warn ⇒ :yes, ...
If command_warnings are on in ansible.cfg, do not warn about this particular line if set to C(no).
Methods included from FreeForm
Methods inherited from Base
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
#argv ⇒ Array<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.
18 |
# File 'lib/ansible/ruby/modules/generated/commands/command.rb', line 18 attribute :argv |
#chdir ⇒ String?
Returns Change into this directory before running the command.
29 |
# File 'lib/ansible/ruby/modules/generated/commands/command.rb', line 29 attribute :chdir |
#creates ⇒ String?
Returns 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_form ⇒ Object
Returns 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 |
#removes ⇒ Object?
Returns 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 |
#stdin ⇒ Object?
Returns 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).
33 |
# File 'lib/ansible/ruby/modules/generated/commands/command.rb', line 33 attribute :warn |