Unix Update Package
- Task type:
ssh_updatepackage
Description
The Unix Update Package task allows you to update a single software package on a system, performing the operation on the local machine (Default mode) or on a remote host via SSH.
The task transparently manages the operating system's package manager, simplifying the execution of update operations within the workflow.
Configuration
Configuration defines the execution mode (local or remote) and options related to the package manager used for the update. Configuration fields can be filled in manually or populated dynamically via workflow parameters and variables.
Server Connection
- Connection mode: Defines the source of the credentials used for the connection. It can assume three operational modes:
- Default: The command is executed from the local machine.
- Manual: Allows the manual entry of SSH connection parameters.
- Environment: Uses a preconfigured connection environment. In this mode, a menu is displayed listing available connections based on the role associated with the Workflow.
- IP Address: IP address of the remote server.
- Hostname: Hostname of the remote server.
- User: Username used to establish the SSH connection.
- Password: Password associated with the connection user.
- Port: Port used for the SSH connection (the default value is 22).
Execute command as another user
By enabling this checkbox, you can execute the search with a user different from the one used for the SSH connection.
- User: Name of the user with whom the command will be executed.
- Password: Password of the user used to execute the command.
Update Details
- Package manager: Menu that allows you to select the appropriate package manager for the destination server's operating system. Choosing the correct manager is essential for the success of the operation.
- yum: To be used for Red Hat-based distributions (such as CentOS, Fedora, RHEL).
- apt: To be used for Debian-based distributions (such as Ubuntu, Debian).
- Package: The exact name of the software package you wish to update (e.g., openssl, httpd, nginx).
Output Parameters
Upon completion of execution, the task exposes the following output parameters:
- result: Contains a text message describing the outcome of the operation or an error message (e.g., "Missing server address").
- resultJson: Represents the result of the task execution in JSON format, including general information, configurations, and execution details.
- exitStatus: Returns the exit code of the update command. A value of 0 indicates that the update was completed successfully.
Example resultJson parameter
{
"run_info": {
"status": "Completed",
"run_result": "Success"
},
"output_parameters": {
"exitStatus": "0"
}
}
Important Notes
- Permissions: The task establishes an SSH connection with the remote server and executes the configured package update command. If you use SSH key authentication, the public key must be registered on the remote server. If the "Execute command as another user" option is enabled, the command is executed with a user different from the main SSH connection user.
- Internet Connectivity: The remote server must have access to the Internet to contact the software repositories from which to download the update.