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 defaults 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 the rundeck to sudoers file(visudo).

Defaults:rundeck requiretty
rundeck ALL=(ALL) NOPASSWD: ALL

Lets Create a new project from rundeck interface
newproject

 

 

 

 

Select the project and under job actions, select New Job.

newjob

 

 

 

 

 

 

 

Add the requested information.

Job Name =

Description =

Job_name

The following are the key information which we should decide based on our requirement.

Options:

Scenario1:

Incase if we are executing the jobs for particular case, we can use option values which will restrict to particular values. Add the below information on the option values.

 

Option Name:<yur-option-name>

Default Value:<your values> Leave it blank incase if we dont 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.

optionvalues

 

 

 

 

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.

Work Flow:

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 remote command ie., 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 which you can use depends on your requirement like scheduling, send notifications, etc.,

Click on Create. That’s it 🙂 You had create a first job on Rundeck

Leave a Reply