How to Create and Configure a Job in Rundeck
Introduction
Rundeck is an open-source automation platform that simplifies the execution of operational tasks across multiple servers through a centralized web interface. It enables administrators and DevOps teams to automate repetitive tasks, schedule jobs, and execute commands securely on remote systems without requiring direct server access.
This guide explains how to create a basic job in Rundeck, configure the required remote host access, and understand the essential job configuration options. It assumes that Rundeck has already been installed and is accessible through its web interface.
Prerequisites
Before creating a job in Rundeck, ensure the following requirements are met:
- Rundeck is installed and running (accessible via the web interface, e.g.,
http://<rundeck-server>:8000). - Administrative access to the Rundeck server.
- A Linux remote host available for job execution.
- SSH connectivity between the Rundeck server and the target host.
- A dedicated
rundeckuser created on the remote server. - SSH public key authentication configured using
ssh-copy-id. - Passwordless sudo privileges granted to the
rundeckuser by updating the/etc/sudoersfile. - Network connectivity between the Rundeck server and the target host.
- Basic knowledge of Linux commands and SSH.
IMPLEMENTATION
In this post, we will explain on how to add simple rundeck jobs. We are not going to cover how to install Rundeck on the host. This post assumes that Rundeck is installed and running on port 8000.
Configure rundeck user on remote host:
useradd rundeck passwd rundeck chage -I -1 -m 0 -M 99999 -E -1 rundeck Copy the key rundeck from rundeck server to client hosts.
ssh-copy-id -i ~/.ssh/id_rsa.pub rundeck@$ip
Add Rundeck to the sudoers file(visudo).
Defaults:rundeck requiretty rundeck ALL=(ALL) NOPASSWD: ALL
Let’s create a new project from the Rundeck interface
Select the project and under job actions, select New Job.
Add the requested information.
Job Name =
Description =
The following is the key information that we should decide based on our requirement.
Options:
Scenario1:
In case if we are executing the jobs for a particular case, we can use option values that will be restricted to particular values. Add the below information on the option values.
Option Name:<your-option-name>
Default Value:<your values>. Leave it blank in case if we don’t want to give any name.
Input Type: Plain Text(preferably)
Allowed Values: List
Restrictions:None
Required:Yes
Multi-valued:<ur selection> Depends on the application/script use case.
Note down the Usage values incase if you are going to use these values if you will be using these option values in the script/application.
Workflow:
Next comes the interesting part/creative part of Rundeck. There will be multiple options which you can select.
Command – Execute a remote command: This option is to execute a remote command, i e., on a remote host
Script – Execute an inline script
Script file or URL – Execute a local script file or a script from a URL
There are multiple options that you can use depends on your requirement, like scheduling, sending notifications, etc.
Click on Create. That’s it 🙂 You have created your first job on Rundeck
Conclusion
Creating jobs in Rundeck provides a simple and efficient way to automate routine administrative tasks across remote servers. By configuring secure SSH access and defining the appropriate job workflow, administrators can execute commands, scripts, or scheduled tasks with minimal manual effort. Rundeck also offers additional features such as job scheduling, notifications, logging, and access control, making it a powerful tool for infrastructure automation and operational management. Once the initial setup is complete, new jobs can be created and managed easily through the Rundeck web interface.



