Module Capistrano::Configuration::Actions::Invocation
In: lib/capistrano/configuration/actions/invocation.rb

Methods

Classes and Modules

Module Capistrano::Configuration::Actions::Invocation::ClassMethods

Public Instance methods

Merges the various default command options into the options hash and returns the result. The default command options that are understand are:

  • :default_environment: If the :env key already exists, the :env key is merged into default_environment and then added back into options.
  • :default_shell: if the :shell key already exists, it will be used. Otherwise, if the :default_shell key exists in the configuration, it will be used. Otherwise, no :shell key is added.

Invokes the given command. If a via key is given, it will be used to determine what method to use to invoke the command. It defaults to :run, but may be :sudo, or any other method that conforms to the same interface as run and sudo.

Execute the given command on all servers that are the target of the current task. If a block is given, it is invoked for all output generated by the command, and should accept three parameters: the SSH channel (which may be used to send data back to the remote process), the stream identifier (:err for stderr, and :out for stdout), and the data that was received.

Like run, but executes the command via sudo. This assumes that the sudo password (if required) is the same as the password for logging in to the server.

Also, this module accepts a :sudo configuration variable, which (if specified) will be used as the full path to the sudo executable on the remote machine:

  set :sudo, "/opt/local/bin/sudo"

Returns the prompt text to use with sudo

[Validate]