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/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
-
#chdir ⇒ String?
Cd into this directory before running the command.
-
#creates ⇒ String?
A filename or (since 2.0) glob pattern, when it already exists, this step will B(not) be run.
-
#executable ⇒ Object?
Change the shell used to execute the command.
-
#free_form ⇒ Object
The command module takes a free form command to run.
-
#removes ⇒ Object?
A filename or (since 2.0) glob pattern, when it does not exist, this step will B(not) be run.
-
#warn ⇒ Boolean?
If command warnings are on in ansible.cfg, do not warn about this particular line if set to no/false.
Methods included from FreeForm
Methods inherited from Base
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
#chdir ⇒ String?
Returns cd into this directory before running the command.
23 |
# File 'lib/ansible/ruby/modules/generated/core/commands/command.rb', line 23 attribute :chdir |
#creates ⇒ String?
Returns 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 |
#executable ⇒ Object?
Returns 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_form ⇒ Object
Returns 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 |
#removes ⇒ Object?
Returns 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 |
#warn ⇒ Boolean?
Returns 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 |